Question

object enables a program to read data from the user. The A. std::cout. std::cin. C. std::cread. D. std:cget. QUESTION 9 Which

please i want correct answers

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ans: std::cin. cin is used to take input from the user in C++ language.

#include<iostream>

void main(){

int n;

std::cout<<"Enter the value of number n: "

std::cin>>n;

}

Ans: HelloWorld. This can be understand by following program sceenshot.Online C++ Compiler Online Python Compile x Please I Want Correct A Chello world progra X 1.5-Introduction to x quiz1-sol.pdf

Add a comment
Know the answer?
Add Answer to:
please i want correct answers object enables a program to read data from the user. The A. std::cout. std::cin. C. st...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a C++ program to read in 4 different types of data values using cin, cout,...

    Write a C++ program to read in 4 different types of data values using cin, cout, and the getline() function and display the values in the same order to the screen. Use cin to read in the first value and getline() to read in the remaining characters. Note that the 4 data items are entered on 1 line. The following shows a sample run of the program. Enter 4 data values: 45 abc 12.34 d The 4 data values entered...

  • C++ with comments please! // numberverifier.cpp #include <iostream> #include <exception> using std::cout; using std::cin; using std::endl;...

    C++ with comments please! // numberverifier.cpp #include <iostream> #include <exception> using std::cout; using std::cin; using std::endl; #include <cmath> #include <cstring> class nonNumber : public exception { public: /* write definition for the constructor */ -- Message is “An invalid input was entered” }; int castInput( char *s ) { char *temp = s; int result = 0, negative = 1; // check for minus sign if ( temp[ 0 ] == '-' ) negative = -1; for ( int i...

  • ,,1. Which of the following statments are valid C++ statements? A) cout << "Hello World" :...

    ,,1. Which of the following statments are valid C++ statements? A) cout << "Hello World" : B) cout << Hello World; C) cout << "Hello " << "World" ; D) cout << "Hello" << "World" ; 2. What is the difference between the literals 'A' and "A"? ,3. Read the input from user; Check for valid entries If input is invalid: print an error message; else: calculate the result and print to the console; exit; The code snippet above may...

  • ​c++ program that takes user input from the console and store the data into a linked list.

    c++ program that takes user input from the console and store the data into a linked list. The input made of 4 objects associated to a car: model, make, mileage and year. My program should take the how many inputs the user want to make, followed by the inputs themselves. After the input, my program should print the data inside the linked list. So far, the issue is that my program print some of the input, but not all. Input sample:3HondaSentra89002017ToyotaCamri1098271999NissanSentra87261987current...

  • solve using the code provided Write a program that will continuously read words from the user,...

    solve using the code provided Write a program that will continuously read words from the user, word by word till the user enter "quit”, the program should print each word in reverse order. Sample Session: (User input in Red color) Enter a word: hello olleh Enter a word: Ahmad damhA Enter a word: quit Good Bye 9 dinclude <iostream> 10 dinclude <cstring> 11 using namespace std; 12 13 int main() { 14 15 char word(100); 16 cin>>word; 17 while (strcmp(word,...

  • PLEASE TYPE OUT IN TEXT (please no pdf or writing) C++ CODE Consider the following program...

    PLEASE TYPE OUT IN TEXT (please no pdf or writing) C++ CODE Consider the following program in which the statements are in the incorrect order. Rearrange the statements in the following order so that the program prompts the user to input: The height of the base of a cylinder The radius of the base of a cylinder The program then outputs (in order): The volume of the cylinder. The surface area of the cylinder Format the output to two decimal...

  • The question I want answered is in C++. How can I pass a value to a function and create a new linked list out of it? For example I have: void getIntegerInput(List<int> list) {    int s;    std::...

    The question I want answered is in C++. How can I pass a value to a function and create a new linked list out of it? For example I have: void getIntegerInput(List<int> list) {    int s;    std::cout << "Type a positive integer then click enter to add it to the linked list\n";    std::cout << "Type -1 to stop\nType -2 to delete an item from the list\n";    std::cin >> s;    while (s != -1)    {        if (s == -2) {            int...

  • In C++ write a program that will read three strings from the user, a phrase, a...

    In C++ write a program that will read three strings from the user, a phrase, a letter to replace, and a replacement letter. The program will change the phrase by replacing each occurrence of a letter with a replacement letter. For example, if the phrase is Mississippi and the letter to replace is 's' the new phrase will be "miizzizzippi". in the function, replace the first parameter is a modifiable string, the second parameter is the occurrence of a letter...

  • 1. Suppose you wrote a program that reads data from cin. You are now required to...

    1. Suppose you wrote a program that reads data from cin. You are now required to reimplement it so that you can read data from a file. You are considering the following changes. I. Declare an ifstream variable in_file II. Replace all occurrences of cin with in_file III. Replace all occurrences of > > and get_line with the appropriate operations for ifstream objects What changes do you need to make? I, II, and III II and III I and III...

  • c++ I am suppose to write a function that gets a number from a user, say...

    c++ I am suppose to write a function that gets a number from a user, say 3.123456789 and then the program gets another number from the user which is used to find out how many decimal digits we want rounded to. So if the user inputs 3 then the number would turn into 3.123 then we are suppose to add two digits next to the rounded number so it would turn into 3.12300. the rounding is suppose to be done...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT