C Programming Tutorial

 
 
 
 

Image

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

void main(){
     int i,j,k;
     clrscr();
     printf(\"*****Reverse Triangle*****\\n\");
     for(i=1;i<=5;i++){
      for(k=1;k<=i;k++)
          printf(\"%3c\",\' \');
      for(j=5;j>=i;j--){
          printf(\"%3c\",\'*\');
           }
           printf(\"\\n\");
      }
getch();
}

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