operators - How do I print the percent sign(%) in c -


this question has answer here:

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

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -