Está en la página 1de 2

#include <stdio.

h>

#include <stdlib.h>

#include <math.h>

int potencia(float x, float y, float a)

printf("Introduce numero y potencia \n");

scanf("%f %f", &x, &y);

a=pow(x,y);

printf("%f^%f=%f", x, y, a);

int tablas(float x, float b, float c, float d, float e, float f, float g, float h, float i, float j)

printf("Introduce numero \n");

scanf("%f", &x);

b=x*2;

c=x*3;

d=x*4;

e=x*5;

f=x*6;

g=x*7;

h=x*8;

i=x*9;

j=x*10;

printf("Tu numero multiplicado del 2-10 es : %f, %f, %f, %f, %f, %f, %f, %f, %f, %f", b, c, d, e, f, g, h,
i, j);

main()
{

float a, b, c, d, e, f, g, h, i, j, x, y;

int o;

do

printf("1.-Potencia\n2.-Tablas\n3.-Salir\n");

scanf("%d", &o);

switch(o)

case 1:

potencia(x, y, a);

break;

case 2:

tablas(x, b, c, d, e, f, g, h, i, j);

break;

}while(o!=3);

return 0;

También podría gustarte