Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- float a, b, c;
- void soma(void)
- {
- printf("Digite os dois numeros para a operacao\n");
- scanf("%f%f",&a,&b);
- }
- int main()
- {
- int operacao;
- printf("Digite 1 para somar\n");
- scanf("%d",&operacao);
- switch(operacao)
- {
- case 1:
- soma();
- c = a + b;
- printf("O resultado e: %f/n", c);
- break;
- default:
- printf("Voce é idiota ou não sabe ler??? \n\n");
- break;
- }
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment