below code will show factorial results
as you can se do while command is using there
so i wanna save all the results which user will get in a single array and when user press "z" to exit then all the results should appear side by side
hope you understand waiting for answer
#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
printf("\tFactorial Generator");
do {
int a, b, c = 0;
printf("\n");
printf("\nEnter any number: "); scanf("%d",&a);
b = a;
for(int d=a;d>=1;d--)
{
if(c==0) c=b;
else c=c*b;
b--;
}
printf("\nThe Factorial of %d is %d",a,c); printf("\nPress any key to Continue\n"); }
while(getch()!='z');
{ printf("Press z again"); }
getch();
}