-2
I’m supposed to do this https://gyazo.com/ae18e6b29f3ffc73c02f518a73145cc4 I drew this up https://gyazo.com/3729ab0e204f3dc49fff3ec9773155eb
But for the most part of 15 years old he won’t let me write to read the name...
#include <stdio.h>
#include <locale.h>
main(){
setlocale(LC_ALL,"portuguese");
int idade;
char nome;
printf("Introduza a sua idade\n");
scanf("%d",&idade);
switch(idade){
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:printf("Lamentamos mas ainda não tem idade para executar este programa");break;
default:printf("PARABÉNS Pode prosseguir");
system("color 8A");
printf("Digite o seu nome e apelido");
scanf("%c",&nome);
printf(" %c você tem %i anos",nome,idade);break;
}
}
Error says: "system is not declared in this Scope"
Explain the problem too, not to understand very well what is wrong in the code and not what you expect from it by the text of the question.
– user28595
in the last part he does not ask me to type the name and surname
– Nope Nope
Yes I do not understand very well but I think I have done correctly in this code however the last scanf is not working in the program affecting also the printf asseguir....
– Nope Nope
First understand what is IDE and compiler http://answall.com/q/101691/3635 and then understand what is C and what is C++ http://answall.com/q/19073/3635
– Guilherme Nascimento