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
Who developed c language and when?
Explain how can you tell whether a program was compiled using c versus c++?
What does %d do in c?
I have seen function declarations that look like this
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
How can I remove the leading spaces from a string?
Why doesnt this code work?
What is string function c?
What is difference between Structure and Unions?
Why we use stdio h in c?
What is structure in c explain with example?
What are the uses of null pointers?
What is scanf () in c?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What are the 5 organizational structures?