How to print the percentage character (sign) in C

1 Answer

0 votes
#include <stdio.h>

int main(void) {
    int n = 7;
    
    printf("%d%%\n", n);
    printf("%%");
}



/*
run:

7%
%

*/

 



answered May 28, 2020 by avibootz

Related questions

1 answer 224 views
1 answer 68 views
68 views asked Jul 24, 2025 by avibootz
2 answers 120 views
2 answers 672 views
...