ads

16. WRITE A PROGRAM TO IMPLEMENT SIMPLE CODE OPTIMIZATION TECHNIQUE USING DO-WHILE.

 

#include<stdio.h>

#include<conio.h>

void main()

{

int n,f;

f=1;

printf("Enter the number:\n");

scanf("%d",&n);

do{

f=f*n;

n--;

}while(n>0);

printf("the Factorial value is :%d",f);

 

}

OUTPUT:


No comments:

Post a Comment