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...

1
01
101
0101
10101

Answer Posted / suket

Mine doesn't require 3 variables:
#include<stdio.h>
int main()
{
int i,j,rows;
printf("Enter no. of rows: ");
scanf("%d",&rows);

printf("Here's your pattern: \n");
for (i=1;i<=rows;i++)
{
for(j=i;j!=0;)
{
if(j%2==0)
{
printf("01");
j=j-2;
}
else
{
printf("1");
j--;
}
}
printf("\n");
}
return 0;
}

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What would be the difficulties with building a bridge that connects the UK and Canada?

1211


I have failed my intermediate can i write entrance exam the next year after completing my backlogs

1662


I am going to appear for ISRO written test on 26 th april 2009 .So kindly forward me sample previous question paper for ISRO for BE Computer Science . My mail id : jothychristiya@gmail.com

2594


2. A product selected for testing is equally likely to have been produced by one the 6 machines/processes. (i) Determine sample space ā€˜S’ (ii) What is the probability that the product is from machine 1? (iii) What is the probability that the product is from machine 2 or machine 4? (iv) What is the probability that the product is from both machine 5 and machine 3? (v) What is the probability that the product is not from machine 6? (vi) What is the probability that the product is not from either machine 6 or machine 1?

1988


how to print a number in character(ex. 123= one twenty three)?

1914


Define configuration and calibration and explain with an example

2021


Please send the details and fee for Intools training course..I would like to do the course in second week of jUNE 2010.

2195


how does data cleansing framework works?

1931


int i=~0; uint j=(uint)i; j++; printf(ā€œ%dā€,j); what is the use of "uint" int the above code

2359


need tcs questn papers from 2007 to 2009 plzzzmail to 9015.rama@gmail.com its urgent

1950


why B+tree usually prefer as on exis structure to a data file?

1947


What are daemon Threads?

2337


what is the definition(body) of a default constructor in c++?

1960


what is the difference between oracle 8i and 9i. if someone could help me out.

1972


who is your role modal give in few sentances

2159