1
o 1
1 0 1
0 1 0 1
1 0 1 0 1
how to design this function format in c-language ?
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,n;
clrscr();
printf("enter the terms :");
for(i=1;i<=n;i++)
{
if(i%2==0)
j=1;
else
j=0;
for(k=1;k<=i;k++)
{
j=!j;
printf("%d ",j);
}
printf("\n");
}
getch();
}
thank u
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / premkumar
main()
{
int i,j,k=1; clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",k);
if(k==0)k=1;
else k=0;
}
printf("\n");
}
| Is This Answer Correct ? | 0 Yes | 0 No |
main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
plz send me all data structure related programs
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details
How to count a sum, when the numbers are read from stdin and stored into a structure?
How we print the table of 3 using for loop in c programing?
How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw...
6 Answers Microsoft, MSD, Oracle,
How we print the table of 2 using for loop in c programing?
main() { int i = 3; for (;i++=0;) printf(ā%dā,i); }
Is the following code legal? typedef struct a { int x; aType *b; }aType
C program to print magic square of order n where n > 3 and n is odd
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!