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
what size shaft is required to transmit 100 hp @1000 RPM ,if max shear stress is 10,000 PSI,angle of twist must be less than 1' /ft/shaft is made of steel.
How to recyling of Expired Computer/Laptop,Mouse,CPU & Key Board (Warranty)?
A polynomials in mamory can be represented by____________
why view is created in database
What is CRC? the material will be used in electrical stampings.
what are the various technique used for inter process communication?
what is technical voice process and define it
Explain i.d.e. for visual c++?
what are the artifacts in coding phase in SDLC????
WHAT HAPPEN WHEN ANY SPINDLE RUN OVER 10 MM HEIGHT ABOVE BOLSTAR IN RING SPINNING FRAME
how to convert postfix notation into prefix in data structures. please send me algo of taha
If you were to drill a circular hole in a sheet of metal and then heat the sheet, what would happen to the size of the hole?
what is the need for oobs
how to find out the name of the users who are currently working starting with the same characters in unix os
Can u send me a sample Final year CSE student 'RESUME' for campus placement to following mail id: aspnetworks@gmail.com