Tagged: star triangle


Program to display right angled triangle of star (asterisk)

Below the program in C that will display right angled triangle of star/asterisk. The program will use for and while loop to display the star/asterisk on the screen. Expected Output * ** *** Here is the code, #include<stdio.h> #include<conio.h> void main() { int i, counter; clrscr(); for(i=0; i<3; i++) { counter = 0; while(counter <= i){ printf(“*”); counter++; } printf(“\n”); } getch(); } This C Program is brought you by LearnCOnline.com

FREE C Programming Cheatsheet

FREE C Programming Cheatsheet


Cheatsheet for a quick glance at C programming concepts and syntax

Thank you! Check you inbox and access your cheat-sheet