Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. void menuTipoChamada();
  4. void leiaTelefone();
  5. void desmembraNumero();
  6.  
  7. int main(void){
  8. menuTipoChamada();
  9. return 0;
  10. }
  11. void menuTipoChamada(void){
  12. int op;
  13. long int numero;
  14. printf("Escolha o tipo de chamada a ser feito:\n");
  15. printf("1 - Para chamadas locais\n");
  16. printf("2 - Para chamadas locais á cobrar\n");
  17. printf("3 - Para Chamadas de longa distância\n");
  18. printf("4 - Para chamadas de longa distância á cobrar\n");
  19. scanf("%d", &op);
  20. return leiaTelefone();
  21. }
  22. void leiaTelefone(void){
  23. int op
  24. long int numero;
  25. switch(op){
  26. case 1: printf("Informe um número de telefone:\n");scanf("%ld", &numero);break;
  27. case 2: printf("Informe um número de telefone:\n");scanf("%ld", &numero);break;
  28. case 3: printf("Informe um número de telefone:\n");scanf("%ld", &numero);break;
  29. case 4: printf("Informe um número de telefone:\n");scanf("%ld", &numero);break;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement