This blog consists of C and C++ programs. C and C++ programming is the basics to learn any programming language. Most of the programs are provided with their respective outputs. This blog also contains Data Structures programs using Object-Oriented Programming (C++). Some of the best books for learning C and C++ programming are also mentioned.

Thursday 25 July 2013

Program to print the Star pattern 6 (Right-angled Triangle)

#include <stdio.h>
void main()
{
int n, c, k;
clrscr();
printf("Enter number of rows: ");
scanf("%d",&n);
for ( c = 1 ; c <= n ; c++ )
{
for( k = 1 ; k <= c ; k++ )
printf("*");
printf("\n");
}
getch();
}




No comments:

Post a Comment