Author Topic: Learning C++! :D  (Read 3681 times)

Quote
#include <iostream>
int main()
{
    using std::cout;
    using std::cin;

    const int Sunday = 1;
    const int Monday = 2;
    const int Tuesday = 3;
    const int Wednesday = 4;
    const int Thursday = 5;
    const int Friday = 6;
    const int Saturday = 7;

    int today;
    cout << "Please enter what day it is: ";
    cin >> today;

    if (today == Sunday)
        cout << "\nToday is Sunday, no school!\n";

    if (today == Monday)
        cout << "\nToday is Monday, back to school.\n";

    if (today == Tuesday)
        cout << "\nToday is Tuesday, still at school.\n";

    if (today == Wednesday)
        cout << "\nToday is Wednesday, middle of the school week.\n";

    if (today == Thursday)
        cout << "\nToday is Thursday, almost the weekends!\n";

    if (today == Friday)
        cout << "\nToday is Friday, tomorrow's the weekend!\n";

    if (today == Saturday)
        cout << "\nFinally! The weekends!\n";

    return 0;
}
i need help with this console program

i type in whatever day it is, but it doesn't say "Today is Friday," etc.

bump

help me with the code

hnnngg

Alright

And

Here

I

Go

Code: [Select]
onprogramstart#>::Detectvariable:Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday

onvariablefound>centerprintuser;thedateis;variable;

endscript

hnnngg

Alright

And

Here

I

Go

Code: [Select]
onprogramstart#>::Detectvariable:Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday

onvariablefound>centerprintuser;thedateis;variable;

endscript
wat





gonna continue on this book

i need help with this console program

i type in whatever day it is, but it doesn't say "Today is Friday," etc.
Works fine for me




ugh why do my programs not work

what does the "a undeclared" mean and how can i fix it


A is a character
yourAnswer is an integer
Also put quotation marks around the A,B and C