operators - How do I print the percent sign(%) in c -
this question has answer here:
- how escape % sign in c's printf? 13 answers
i beginner in c, , wondering why program not print % sign?
the code is:
#include<stdio.h> main() { printf("%"); getch(); }
your problem have change:
printf("%");
to
printf("%%");
or use ascii code , write:
printf("%c", 37);
:)
Comments
Post a Comment