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
How does C pass variables to a function ?
Why there is Powerfactor difference when we compare to our Capacitive Panel and TNEB side?
what is the difference between physical address and logical address?
#include
am a textile eng. frombut with major of my course including chemical eng, subjects, can i too apply to the co.?
What is VAT Account determination ? and how we can map in SAP ?
What is meant by STL?
how much lighting lux need for a common walking area at night time
There are three bucket...Apple,Orange and Apple+Orange....On each Bucket one of the following labels are there..'A','O','A+O'...all this labels are not correctly patched on Bucket..identify which bucket contains What? You can not see bucket..u can pick any number of fruit from any basket...???
why every computer should have a boot strap routine?
What is histogram? why and how it is used?
hello sir,pls fdorward previous group-I exam papers .....
how will u send the idoc
describe what is const pointer and why do we need it?
i possess a little knowledge of core java . so is it will be difficult for me to start advanced java?