Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IFF - Introdução à Programação
- //Slide - Página 15 - Exercício 4
- #include<stdio.h>
- #include<locale.h>
- int main(){
- setlocale(LC_ALL, "Portuguese");
- int ano;
- printf("Entre com seu ano de nascimento: ");
- scanf("%d",&ano);
- if (ano>0){
- printf("Você terá %d anos em 2050!", 2050-ano);
- }else{
- printf("Entre com uma idade válida.")
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement