Drowze

Listas Adicionais 01 Ex 08

May 18th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1.  /* 8.Faça um programa que leia um número inteiro e imprima o seu sucessor e seu antecessor.
  2.  */
  3.  
  4. #include <stdlib.h>
  5. #include <stdio.h>
  6.  
  7. void main(){
  8.     int numero;
  9.  
  10.     printf("Digite um numero: "); scanf("%d",&numero);
  11.     printf("Antecessor: %d\nSucessor: %d\n",numero-1,numero+1);
  12.  
  13.     system("Pause");
  14. }
Advertisement
Add Comment
Please, Sign In to add comment