Kamis, 30 Oktober 2025

ex0602.c printf chart int float double

/* ex0602.c */
#include <stdio.h>

int main()
{
    char c;
    int i;
    float f;
    double d;

    c = 'a';
    i = 1;
    f = 19.0;
    d = 20000.009;

    printf("%c\n", c);
    printf("%d\n", i);
    printf("%f\n", f);
    printf("%f\n", d);
    return(0);
}

output:
 
a
1
19.000000
20000.009000

Process returned 0 (0x0)   execution time : 0.115 s
Press any key to continue.

Tidak ada komentar:

Posting Komentar