GJPassos

APS 01 EX 03 ALGORITMOS 02

May 15th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. //APS 01 EX 03
  2. //ALGORITMOS 02 PROF MALGARETE - CENTRO TECNOLOGICO UNIVERSIDADE POSITIVO
  3. //GILMAR JUNIOR DOS PASSOS
  4.  
  5. #include "stdlib.h"
  6.  #include "conio.h"
  7.  #include "stdio.h"
  8.  #include "string.h"
  9.  #include "locale.h"
  10.  
  11. void main()
  12. {
  13.     setlocale(LC_ALL, "Portuguese");
  14.  
  15.     float peso, peso1, peso2;
  16.  
  17.     printf ("Favor informar o peso:\n");
  18.     scanf ("%f",&peso);
  19.  
  20.     peso1 = ((peso * 15) / 100) + peso;
  21.     peso2 = ((peso * 20) / 100) - peso;
  22.  
  23.  
  24.     printf ("Se engordar 15 \n");
  25.     printf ("%.2f",peso1);
  26.  
  27.     printf ("\nSe emagrecer 20 \n");
  28.     printf ("%.2f",peso2);
  29.  
  30.     getch ();
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment