Advertisement
Kl43z

tabla / c

Oct 1st, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(){
  5.     int input=0,i=0;
  6.     float total=0; 
  7.  
  8.  
  9.     printf ("\nIndique un número para calcular sus pontencias hasta 10: \n");
  10.     scanf ("%d", &input);
  11.     printf ("%6s%13s%25s\n", "Número", "Exponente", "Resultado");
  12.     for (i==0; i<=10; i++){
  13.         total=pow(input, i);
  14.         printf ("%6d%13d%25.0f\n", input, i , total);
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement