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


Please Help Members By Posting Answers For Below Questions

Do pointers take up memory?

861


what are non standard function in c

1661


Explain how can I remove the trailing spaces from a string?

825


Explain the Difference between the New and Malloc keyword.

891


Explain the use of keyword 'register' with respect to variables.

821


How can you allocate arrays or structures bigger than 64K?

910


Explain 'bit masking'?

842


In c programming language, how many parameters can be passed to a function ?

878


#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); }

960


How many main () function we can have in a project?

890


What is static volatile in c?

767


Explain what is wrong in this statement?

855


What does it mean when the linker says that _end is undefined?

867


Which is the best website to learn c programming?

830


What is graph in c?

828