inverted triangle c 2b 2b

Solutions on MaxInterview for inverted triangle c 2b 2b by the best coders in the world

showing results for - "inverted triangle c 2b 2b"
Tess
08 Mar 2020
1#include<bits/stdc++.h>
2using namespace std;
3int main()
4{
5	int n;
6	cin>>n;
7	for(int i=1;i<=n;i++)
8	{
9		for(int j=1;j<=n+1-i;j++)
10		{
11			cout<<j<<" ";
12		}cout<<endl;
13			
14	}
15	return 0;
16	
17}
Zain
23 Oct 2016
1#include<bits/stdc++.h>
2using namespace std;
3int main()
4{
5	int n;
6	cin>>n;	
7	for(int i=n;i>=1;i--)
8	{
9		for(int j=1;j<=i;j++){
10			cout<<"8*";		
11		}
12		cout<<endl;
13	}
14	return 0;
15}
Grey
06 Aug 2020
1*****
2****
3***
4**
5*