Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

rohit ranjan


{ City } vellore
< Country > india
* Profession * student
User No # 116679
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 2
Users Marked my Answers as Wrong # 1
Questions / { rohit ranjan }
Questions Answers Category Views Company eMail




Answers / { rohit ranjan }

Question { Wipro, 63879 }

Write a program in c to print
1
121
12321
1234321
123454321


Answer

#include
using namespace std;
int main()
{
int i,j,k,t,n,c,a[20];
cin>>t;
for(k=0;k<20;k++)
a[k]=(k+1);
while(t--)
{
cin>>n;
for(i=0;i {
c=i-1;
for(j=0;j<(2*i+1);j++)
{
if(i>=j)
cout< else
{
cout< c--;
}
}cout<<" ";
}cout< }
return 0;
}

Is This Answer Correct ?    2 Yes 1 No