Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a program which writes the following statement to the console (you do not

ID: 3882496 • Letter: C

Question

Create a program which writes the following statement to the console (you do not need to print words in color): My name is Kang Chen and I am a freshmen at Southern Illinois University. I hope to achieve an A in this course and to graduate by 2020. Where the words in: Red: is your name stored as a string variable called name Blue: is your current role stored as a string variable called yearOfStudy Yellow: is what you hope to achieve as a grade stored as a character called grade Green: is what year you expect to graduate stored as an integer called year

Explanation / Answer

#include <iostream>

using namespace std;

int main() {

string name = "Kang Chen";

string yearOfStudy = "freshman";

char grade = 'A';

int year = 2020;

cout << "My name is " << name << " and I am a " << yearOfStudy << " at Southern Illinois University ";

cout << "I hope to achieve an " << grade << " in this course and to graduate by " << year << ". ";

return 0;

}

Output:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote