Skip to content

Commit

Permalink
pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
FazeelUsmani authored Nov 9, 2019
1 parent f0b49a0 commit 923b7d9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions 001 print right angled triangle pattern.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int main() {

int r, i,j,t,x=1;
cin>>t;
while(t--)
{
cin>>r;
cout<<"Case #"<<x++<<":"<<"\n";
for(i=1;i<=r;i++)
{

for(j=0;j<r-i;j++)
cout<<" ";
for(j=0;j<i;j++)
cout<<"*";
cout<<"\n";
}
}
return 0;
}

0 comments on commit 923b7d9

Please sign in to comment.