You are on page 1of 1

Q1(

#include<stdio.h>
Int main <>
{

int i=0;
while(i<=6)
{
printf("%d\t%3d\n",i++,pow(2,i));
return 0;

Q2)

#include<stdio.h>
Int main
{
int n,i,f;
f=1;
scanf("%d",&n);
i=n;
while (i>=1)
{
f=f*i;
i--;
}
printf("the factorial of %d is:%d",n,f);
return 0;
}

You might also like