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

i am satish i want to preapare for group-1 exams so please help me?

1548


Hi l, I want to install a water purifier (UV) at my home. the distance of water purifier from water tank [1000 lt ] is 7 ft. Is it sufficient for electrical water purifier? I want to know what is the water pressure from 1000 lt tank (the pipe used from water tank to machine is of inch 1-1/4") please note minimum water pressure is required for UV is - Water Pressure Min: 0.4 kg/sq. cm.Max: 2.0 kg/sq. cm. Please advise me on the following: 1) What is the water pressure generate in above condition. 2) What is the required height from the UV machine to water tank for the above condition? Thanks is advance.

1487


what are nanoemulsions and how are they prepared? i want a brief outline about nanoemulsions.. is anyone of you is having any literature, can you share that? also any an idea where i can get the information?

1553


how 2 write a program of this pattern usin for loop?? 1 2 3 4 5 6 7 8 9 10

1600


List three things you can do with the files you create by recording your voice on your computer

3134






I want to make my career in networking so how to going there? right now i have done a+ n+ ccna course from cms com institute but i m not certified with globle certification os what is my frist step ?, my finincial prob also with me plz sorry isubmit it

1504


What are the inspection and test plan for lift materials?

1550


how you judge that your interview go good????

1488


Explain i.d.e. for visual c++?

1651


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

1516


Explain power?

871


What is spooling and buffering?

1280


discus the worst and best case complexity of binary search

1303


Please send me Sample papers National Informatics Centre (NIC) Programmer. I am giving this paper first time..so if any one have previous question papers send to manoj200.yadav@gmail.com. thnx in advance

1441


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

1754