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 are predefined functions in c?
What is storage class?
What are the rules for the identifier?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
What is the difference between class and object in c?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
Write a program which returns the first non repetitive character in the string?
I came across some code that puts a (void) cast before each call to printf. Why?
Write a program to print "hello world" without using a semicolon?
What is the meaning of && in c?
what is different between auto and local static? why should we use local static?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
what is the syallabus of computer science students in group- 1?
What is the purpose of 'register' keyword in c language?
Is c pass by value or reference?