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
Write a program to print fibonacci series without using recursion?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
What is the use of parallelize in spark?
Why header file is used in c?
What would be an example of a structure analogous to structure c?
What is meant by int main ()?
How is null defined in c?
What is a list in c?
How can I sort more data than will fit in memory?
What is c programming structure?
Write the syntax and purpose of a switch statement in C.
Explain union.
What is main function in c?
Tell me what are bitwise shift operators?
What are pointers? What are different types of pointers?