#include <iostream>
#include <string>
using namespace std;
int main()
{
// A switch program that shows the user his input choice
string word1 = "Achieve";
cout << "Welcome to Your AccuWeather Report Screen." << endl;
cout << "Your choices are listed at the bottom." << endl;
cout << "Number 1 - Temperature outside right now" << endl;
cout << "Number 2 - Stock Price of the day" << endl;
cout << "Number 3 - Word of the day" << endl;
cout << "Number 4 - Check the Last account that was opened" << endl;
int Answer;
cout << "Answer : ";
cin >> Answer;
// Shows the outcome of the operators number input
switch (Answer)
{
case 1:
cout << " It's a sunny, 85F, warm day with a nice chilling breeze comming from the north";
break;
case 2:
cout << "Stock Price as of 2 pm is $3.45 per share";
break;
case 3:
cout << word1;
break;
case 4:
cout << "Mr. Jones...he was selling his cat on Craigslist for 5 Pesos. No one bought his cat. =( ";
break;
// Incase if user inputs a wrong choice
default:
cout << "What did you type?? Try again!";
// Code used to generate try again
char again = 'y';
while (again == 'y')
{
cout << "Try again?? (y/n): ";
cin >> again;
}
cout << " Bye!!!" << endl;
system("PAUSE");
return 0;
}
this show the error:
Error 1 error C1075: end of file found before the left brace '{' at 'c:\users\hp\documents\visual studio 2010\projects\week3assign\week3assign\week3.cpp(7)' was matched c:\users\hp\documents\visual studio 2010\projects\week3assign\week3assign\week3.cpp