174k views
4 votes
What statement would you use to read a value from keyboard input into the variable cheeses?

1 Answer

6 votes

Answer:

Statement to read input in C++.

cin>>cheeses;

Step-by-step explanation:

To read a value from keyboard in C++, we use "cin>>variable;" statement.

This will read a value from the keyboard and store that value in the variable.

Before reading any value to a variable, first we need to declare a variable that can store the value.

Implementation in c++.

#include <bits/stdc++.h>

using namespace std;

int main()

{

int cheeses;

cin>>cheeses;

return 0;

}

User Spadel
by
7.4k points