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
write a c programme to count the characters words and lines in a text book
I am going to HAL Online test for Computer Science. Can you please mail me the model question papers ?
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?
What is mean by the error LVALUE REQUIRED in C language
nohup sort employees > list 2 > error out & what will happen?
Explain the concept of segmentaion.
why view is created in database
WHAT IS DIFFERENT BETWEEN YOU AND OTHER APPLICANT TO GIVE YOU THE JOB
what are the artifacts in coding phase in SDLC????
explain in detail about life cycle of thread
discuss the conditional formatting and advanced filtering features in MS-Excel with suitable example
successful command to make linux system as router in redhat-+
what is program data insulation in dbms?
hai,am a marine engineer..pls anyone tell me what is the abbrevation for "gfca" in Mitsui B&w 7l67gfca engine.my mail id is kamaraj_mech@yahoo.co.in
Hi All... PLease send me if anyone have "Information Security Officer" Aptitude papers. Please Mail me at mannusanghi@gmail.com