-1
Not giving the results, always 0
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
main ()
{
setlocale(LC_ALL, "Portuguese");
int i;
for (i = 1; i <= 10; i++)
{
printf("6 X %.0f = %.0f\n",i, 6*i);
}
return 0;
system("pause");
}
what are you seeing go wrong ? what you wanted to happen and isn’t happening ?
– zentrunix
n, is giving the result in all 0 :/
– WCDS
Wesley, could you comment on the purpose of this
%.0f
of your code and how you got into it?– Bacco
%.0f or use to show where there will be a variable, then I put the variables and each variable goes to a defined place. if it has two variables, the first %.0f and the second %.0f
– WCDS
So, my teacher who told you to use this kkkk
– WCDS
I doubt for a moment that he said that, probably his interpretation was superficial - although nowadays he does not doubt anything about teachers. - Anyway, you should use language documentation as a basis, not "find" anything.
– Bacco
I doubt less than Bacco, but I also doubt :) At least not in this context I think he did not say exactly this.
– Maniero
Could you explain to me in what context use the "%. 0f"?
– WCDS
The good thing would be to read the documentation. See this answer here, it may help you understand about the printf family placeholders: https://answall.com/a/10880/70
– Bacco
This teacher is complicated... It does not explain almost anything, we have to stay looking for solutions
– WCDS
Thank you so much :) Good Sunday
– WCDS
Now I realize that the teacher is great, he sends students who will work in a profession that is finding solutions all the time to do what? Finding solutions! I wish all teachers were like that.
– Maniero