C Programming Tutorial

 
 
 
 

Image

#include <stdio.h>
#include <conio.h>

void main(){
     char i,a,b,c,d;
     int p;
     clrscr();
     printf(\"\\n*****output*******\\n\\n\");
     for(i=\'G\';i>=\'A\';i--){

    for(a=\'A\';a<=i;a++)
    {
       if(a!=\'G\')
       printf(\"%c\",a);
    }

    for(b=\'G\';b>i;b--)
        printf(\" \");

    for(c=\'F\';c>i;c--)
        printf(\" \");

    for(p=i;p>=\'A\';p--)
       printf(\"%c\",p);

    printf(\"\\n\");
     }
getch();
}

 
 
Didn't find what you were looking for? Find more on Program to display triangle