Ich kann nicht glauben, dass ich hier feststecke, aber ich kann nicht darüber hinwegkommen. Ich möchte eine Ganzzahl long
in die Mitte eines Satzes setzen.printf() Funktion in C
Ich bekomme diese Ausgabe;
Howdy, I am 166662
Process returned 0 (0x0) execution time : 0.019 s
Press any key to continue
Ich verwende Codeblocks, um dies auszuführen.
#include <stdio.h>
int main(){
long mn = 166662;
printf("Howdy, I am %ld",mn,"i hope that you had a better better day than I having.\n");
return 0;
}
Lesen Sie die printf-Spezifikation: Zuerst format string, dann Parameter. – Yunnosch
'" Howdy, ich bin% ld "' -> '" Howdy, ich bin% ld.% S "' – BLUEPIXY
[Lesen Sie die Dokumentation zu 'printf'] (http://en.cppreference.com/w/ cpp/io/c/fprintf). Es funktioniert nicht so. – tadman