diogoAlves

IFF/Introdução à Programação/Slide/Pag 21/Ex 1

Feb 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. //IFF - Introdução à Programação
  2. //Slide - Página 21 - Exercício 1
  3. #include<stdio.h>
  4. #include<locale.h>
  5.  
  6. int main(){
  7.     setlocale(LC_ALL, "Portuguese");
  8.     int n;
  9.     printf("Entre com o número: ");
  10.     scanf("%d",&n);
  11.     if (n>0){
  12.         printf("O número é positivo!");
  13.     }else{
  14.         printf("O número é negativo!");
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment