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? -

html - Unable to style the color of bullets in a list -

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