Answer Posted / azad sable, chiplun
void main()
{
int i,j,k,t,f1,f2,f3,z,sp;
sp=20;
clrscr();
for(i=0;i<=4;i++)
{
for(k=0;k<sp-1;k++)
printf("");
sp=0;
for(j=0;j<=i;j++)
{
f1=f2=f3=1;
t=i;
while(t!=0)
{
f1=f1*t;
t--;
}
t=j;
while(t!=0)
{
f2=f2*t;
t--;
}
t=i-j;
while(t!=0)
{
f3=f3*t;
t--;
}
z=f1/(f2*f3);
printf("%4d",z);
}
printf("\n");
}
getch():
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
Is exit(status) truly equivalent to returning the same status from main?
What are operators in c?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
program for reversing a selected line word by word when multiple lines are given without using strrev
What is operator precedence?
What is a rvalue?
What are data types in c language?
What is meant by preprocessor in c?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
Explain how can you tell whether a program was compiled using c versus c++?
Does c have function or method?
What is the benefit of using an enum rather than a #define constant?
What is the purpose of ftell?