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
Do pointers take up memory?
what are non standard function in c
Explain how can I remove the trailing spaces from a string?
Explain the Difference between the New and Malloc keyword.
Explain the use of keyword 'register' with respect to variables.
How can you allocate arrays or structures bigger than 64K?
Explain 'bit masking'?
In c programming language, how many parameters can be passed to a function ?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
How many main () function we can have in a project?
What is static volatile in c?
Explain what is wrong in this statement?
What does it mean when the linker says that _end is undefined?
Which is the best website to learn c programming?
What is graph in c?