Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IFF - Introdução à Programação
- //Lista - Exercício 96
- #include<stdio.h>
- #include<locale.h>
- char Info(int n){
- char info;
- if(n>0) info='P'; else info='N';
- return info;
- }
- int main(){
- setlocale(LC_ALL,"Portuguese");
- int n;
- printf("Entre com o valor: ");
- scanf("%d",&n);
- printf("O número é %c. (P - Positivo / N - Negativo)",Info(n));
- }
Advertisement
Add Comment
Please, Sign In to add comment