|
c++ program to print star pyramid patterns
C++ Program to Print Star Pyramid Patterns:DESCRIPTION: This is a c++ program to print star pyramid patterns.This is how to print stars in c++ using for loop.You can print star pyramid patterns in c++ using for loop. |
PROGRAM:
1)#include<iostream>
2)using namespace std;
3)int main()
4){
5)//for rows you use first loop(i)
6)for(int i=1;i<10;i++){
7)//for coloms you use second loop(j)
8)for(int j=0;j<10;j++)
9)cout<<"*";
10)cout<<endl;
11)}
12)return 0;
13)}
|
c++ program to print star pyramid patterns |
|
how to print stars in c++ using for loop |
|
c++ program to print star pyramid patterns
DESCRIPTION: This is a c++ program to print star pyramid patterns using for loops.The first loop is i loop for rows to print and second loop j is used for colomns in c++ program.The loop starts from 1 and end to 5*. ******* ****** **** *** ** * How to print Stars in c++ using for loop: You can print star pyramid patterns in c++ using loop by following this program in c++.The two major loops are used to print pyramid stars in c++.The first loop is i and other loop is j.This is your option to choose tha how many stars you want in first row and colomns.
|
0 Comments