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
sir/medam i had completed my B-TECH(CSE)2011 with 61%.i have to go USA for futhure studies.i dnt know what is steps for do futhure studies in USA so could you please tell me
What is frog testing? What is cone model?
Anyone have thesis paper about "Electrical Load Forecasting" . Or the web addresses where people usually upload their thesis paper except IEEE.
What experience have you had in working with field forces?
hai iam selected in po exam in allahabad bank . my interview date is 02-06-2009. so plese send me some sample question on my email. my email is nitinbikhani@yahoo.com
how much the percentile as a good percentile in elitmus.
can any one give 10 ways to create a file in unix...???? through command prompt....
plz tell me which books r important for gate exam (CSE)
How to select the total numbers of fire extinguisher installed in a room ?
how to configure cisco router & switches plz provide me path steps?
am looking for ms,i got ielts score 5.5,and i dont have english score 60 in any any year.tell me can i get offer lettr from any university.is i am elegible..?
How does Earthquake-proofing work?
write an algorithm in O(n) time for finding the kth smaalest element form an array of n elements , where n and k are entered by user
compare the conditional operator with if-else-if statement.
what two ways you can use to ensure that visual basic does not allow uncleared variables?