Kamis, 27 November 2025

ex1101.c for c++ c--

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

int main()
{
    int c;
    for(c=-5;c<5;c++)
        printf("%d ",c);
    for(;c>=-5;c--)
        printf("%d ",c);
    putchar('\n');
    return(0);
}

output:
 
-5 -4 -3 -2 -1 0 1 2 3 4 5 4 3 2 1 0 -1 -2 -3 -4 -5

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

Tidak ada komentar:

Posting Komentar