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 227 views
1 answer 73 views
73 views asked Jul 24, 2025 by avibootz
2 answers 128 views
2 answers 686 views
...