Advertisement
Guest User

kkk

a guest
Apr 19th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<math.h>
  4. //ENTRADA DE DADOS//----------------------------------------------------------
  5. float entrada (){
  6. float a;
  7. printf("Digite um numero: \n");
  8. scanf("%f", &a);
  9. return (a);
  10. }
  11.  
  12. //PROCESSAMENTO DE DADOS//-----------------------------------------------------
  13. float processamento (float a){
  14. float potencia;
  15. potencia=a*a;
  16. return (potencia);
  17. }
  18.  
  19. //SAIDA DE DADOS//--------------------------------------------------------------
  20. float saida (float result){
  21. printf("\nA potencia dos numeros inseridos eh: %.1f", result);
  22. }
  23.  
  24. //MAIN//-------------------------------------------------------------------------
  25. int main ()
  26. {
  27. float a, result;
  28. a=entrada();
  29. result=processamento(a);
  30. saida(result);
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement