Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* 8.Faça um programa que leia um número inteiro e imprima o seu sucessor e seu antecessor.
- */
- #include <stdlib.h>
- #include <stdio.h>
- void main(){
- int numero;
- printf("Digite um numero: "); scanf("%d",&numero);
- printf("Antecessor: %d\nSucessor: %d\n",numero-1,numero+1);
- system("Pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment