inverted triangle number pattern in c 2b 2b

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

showing results for - "inverted triangle number pattern in c 2b 2b"
Stefania
31 Sep 2017
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}
Facundo
27 Nov 2017
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}