Write a program to produce the following output in c language?
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
Answer Posted / rajesh
#include<iostream>
#include<conio.h>
int main()
{
cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<1<<endl;
cout<<"\t"<<"\t"<<"\t"<<1<<"\t"<<"\t"<<"\t"<<1<<endl;
cout<<"\t"<<"\t"<<1<<"\t"<<"\t"<<2<<"\t"<<"\t"<<"\t"<<1<<endl;
cout<<"\t"<<1<<"\t"<<"\t"<<3<<"\t"<<"\t"<<"\t"<<3<<"\t"<<"\t"<<"\t"<<1<<"\n";
cout<<1<<"\t"<<4<<"\t"<<"\t"<<"\t"<<6<<"\t"<<"\t"<<"\t"<<4<<"\t"<<"\t"<<"\t"<<1;
getch();
return 0;
}
| Is This Answer Correct ? | 1 Yes | 8 No |
Post New Answer View All Answers
What is #ifdef ? What is its application?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
List some of the dynamic data structures in C?
What are the rules for identifiers in c?
What is a union?
What is function what are the types of function?
What are the disadvantages of c language?
what is a function method?give example?
What do you mean by keywords in c?
What are the characteristics of arrays in c?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
Explain what is wrong with this program statement? Void = 10;
Difference between constant pointer and pointer to a constant.
Is c easier than java?
How can I read/write structures from/to data files?