Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment submission #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vivianpppp
Copy link

No description provided.

Copy link

@john-lakeman john-lakeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assigned to your pull request

Copy link

@john-lakeman john-lakeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address all of the comments.

@@ -9,7 +9,7 @@ int main() {
int average_pig_weight = 150;
int average_cow_weight = 300;

int total_weight = num_pigs * average_cow_weight + num_cows * average_cow_weight;
int total_weight = num_pigs * average_pig_weight + num_cows * average_cow_weight;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While not required, I do think that if you put ( ) around "num_pigs * average_pig_weight" and again around "num_cows * average_cow_weight" it would make it easier for humans to read.

int price_avocado = 3;
int price_tomato = 1;
int num_avocados = 3;
int num_tomatoes = 2;
// Step 1: Prompt the user to input the number of tomatoes and avocados required.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cout << "How many tomatoes?" << endl;
cin >> num_tomatoes;

This is how I would write a prompt for a user's input to assign a value to the variables. Currently your variable values are static, so you would have to edit the code to change them, rather than run the program again.

}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static values instead of prompts throughout utilizing cout and cin.

Copy link

@cyndisong28 cyndisong28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assigned to your pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants