Merge programs

Hi, can anyone merge this two programs into one. I only need to input one number to get both results. Thnx

#include "stdio.h"
#include "conio.h"
int main()
{
float n,f,a;
printf("Escriba el numero a trabajar");
scanf("%f",&n);
f=n;
for(a=n-1; a>0; a=a-1)
{
f=f*a;
}
printf("El factorial es %f",f);


getchar();
getchar();
}




#include "stdio.h"
#include "conio.h"
int main()
{
float a=0,n=0,f=0;

printf("Escriba el numero");
scanf("%f",&n);

for (a=1; a<11; a++)
{
f=n*a;
printf("%2.2 * %2.2f= %2.2f\n", a,n,f);
}
getchar();
getchar();
}
Please use the forum code tags in the future to make your code more readable.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "stdio.h"
#include "conio.h"
int main()
{
float n,f,a;
printf("Escriba el numero a trabajar");
scanf("%f",&n);
f=n;
for(a=n-1; a>0; a=a-1)
{
	f=f*a;
}
printf("El factorial es %f",f);
for (a=1; a<11; a++)
{
	f=n*a;
	printf("%2.2 * %2.2f= %2.2f\n", a,n,f);
}
getchar();
getchar();
}
Topic archived. No new replies allowed.