Guest User

Untitled

a guest
Dec 11th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. #include <conio.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. main()
  6. {
  7. int numero=0, i=0, resultado=0;
  8. char respuesta[1];
  9.  
  10. do
  11. {
  12. printf (" \t\t Generador de Tablas de Multiplicar del 1 al 9 \n");
  13.  
  14. printf (" \n\n Introduzca un numero del 1 al 9 para desplegar su tabla de multiplicar: --> ");
  15. scanf ("%i", &numero);
  16. system ("cls");
  17.  
  18. if (numero >=1 && numero <=9)
  19. {
  20. printf ("\n\t\t Esta es la tabla de multiplicar del numero %i \n", numero);
  21.  
  22. for (i=1; i<=10; i++)
  23. {
  24. resultado = numero*i;
  25. printf ("\n\t\t %i x %i = %i", numero, i, resultado);
  26. }
  27. }
  28.  
  29. else
  30. {
  31. printf (" \n\n\t\t ----- Solo numeros entre el 1 y el 9 ----- \n");
  32. }
  33.  
  34. printf (" \n\n Quieres realizar otra multiplicacion ? S/N ");
  35. scanf ("%s", respuesta);
  36.  
  37. } while (respuesta == 's' );
  38.  
  39. getch();
  40. }
Add Comment
Please, Sign In to add comment