#include<stdio.h>
#include<conio.h>
void main()
{
int i,masukkan,hasil=1;
printf("Input Nilai : ");scanf("%d",&masukkan);
printf("Hasil : ");
for(i=1;i<=masukkan;i++)
{
if(i==masukkan)
printf("%d",i);
else
printf("%d*",i);
hasil=hasil*i;
}
printf(" = %d",hasil);
}
No comments:
Post a Comment