Intro to CS 1 C++ CodeLab Complete Question & Answers
Monday, June 18, 2012
Homework 2: Input
1. Given an int variable datum that has already been declared, write a statement that reads an integer value from standard input into this variable.
cin >> datum ;
2. Write an expression that attempts to read a double value from standard input and store it in an double variable, x, that has already been declared.
cin >> x;
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment