1
I’m trying to compile this program here in Code::Blocks but I’m not getting it and I don’t understand why.
#include <iostream>
#include <string>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
using std::endl;
using std::cout;
using std::cin;
int main()
{
int x = 0;
cout << "Qual o mês atual Digite apenas um número de 0 a 12" << endl;
cin >> x ;
switch (x)
{
case 1 : cout << "Janeiro" << endl; break
case 2 : cout << "Fevereiro" << endl; break
case 3 : cout << "Março" << endl; break
case 4 : cout << "Abril" << endl; break
case 5 : cout << "Maio" << endl; break
case 6 : cout << "Junho" << endl; break
case 7 : cout << "Julho" << endl; break
case 8 : cout << "Agosto" << endl; break
case 9 : cout << "Setembro" << endl; break
case 10 : cout << "Outubro" << endl; break
case 11 : cout << "Novembro" << endl; break
case 12 : cout << "Dezembro" << endl; break
default : cout << "Digite um número de 0 à 12" << endl;
}
}
Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question or answer you find useful on the entire site (when you have 15 points).
– Maniero