Concept explainers
Discuss the meaning of each of the following objects:
a) std: :cin
b) std: : cout
(a)
To discuss the meaning of std::cin.
Explanation of Solution
cin is an object which is used to read the data from input devices in a C++ program. Here, std is the standard I/O reader. It needs “iostream” header file to be included with preprocessor as #include<iostream>.std::cin is normally connected to the keyboard to input data. Data is inputted by a concatenating stream extraction operator (>gt;).
So, std::cin is used to read input from the user.
(b)
To discuss the meaning of std::cout.
Explanation of Solution
cout is an object which is used to write the output to the console in a C++ program. Here, std is the standard I/O reader. It needs “iostream” header file to be included with preprocessor as #include<iostream>.std::cout is normally connected to screen to output the data.std::cout indicates that the cout is used from “namespace ” std. Data is outputted by a concatenating stream insertion operator (<<).
So,std::cout will send the stream of characters to the standard output stream object.
Want to see more full solutions like this?
Chapter 2 Solutions
C++ How to Program (10th Edition)
- Object-Oriented Programming : (Programming Language is C#) Please with More comments, Thanks a lot!arrow_forwardnew code ( in pyton language )arrow_forward01 (B):- By using array named STD. Write a program in C++ LANGUAGE to calculate student appreciation based on the following criteria's. When the average in the range from 50 to 59 → print ACCEPT When the average in the range from 60 to 69 → print MEDIUM When the average in the range from 70 to 79 → print GOOD When the average in the range from 80 to 89 → print VERY GOOD When the average in the range from 90 to 99 → print EXCELLENT Otherwise print FAILarrow_forward
- Computer Science Please make an object-oriented python code for this assignment. Include screenshots of the Output and explanation section, please. The explanation section is very important and screenshots in python of the whole code. you register to the hospital with your name, and surname.. - you need to go to the hospital so you need to enter how far you live from it - you need to enter personal info (age, gender, ...) and salary information - the system accepts these inputs and calculates how much it costs you (because the more you earn, the more you'll pay for health services..) - the system pays you back your traveling time and miles - you have an overview of the costs and can accept or not - if you accept, you can select a date for the shot.arrow_forwardpublic static void main(String [] args) { // Step 2: Construct a Day object representing today // and assign it to a variable called aDay // Step 3: Construct a Day object representing the day for our Exam1 on March 1, 2022, and assign it to a variable called examOne // // // Step 4: Declare three integer variables called year, month and day with initial values of 2022, 4, 12. // // 4 // Step 5: Construct a Day object using the three variables and assign it to a variable called examTwo 6. :7 28 29 // // Step 6: Display the three days on separate lines without any messages 30 31 // 32 33 // Step 7: Display the number of days as a positive integer between the two exams with a message 34 35 // 36 // "Number of days between the two exams: " 37 38 39 // Step 8: Update aDay to the day two days later 40 41 // Step 9: Print the year, month and day of aDay, one value per line without any messages 42 43 // 44 45 } 46 47arrow_forward{JAVA programing} Declare and initialize an integer variable named num with the value 10.Declare and initialize a double variable named pi with the value 3.14159.Declare and initialize a boolean variable named isTrue with the value true.Declare and initialize a string array variable named colors with the values "red", "green", and "blue".Print the value of num, pi, and isTrue to the console.Use a for loop to iterate over the colors array and print each color to the console.arrow_forward
- (Data processing) Construct a three-dimensional weather array for a two-week time period. Include this array in a C++ program that displays the temperatures correctly in response to any of the following user requests: • Any day’s high and low temperatures • Average high and low temperatures for a given month • Month and day with the highest temperature • Month and day with the lowest temperaturearrow_forwardEvaluate the following python statement: g = graphics.Point(55, 45) What is g?arrow_forwardHelp fix my Java Code: This is my current calendar:[ fig : 1] --------------------------------- Display an annual calendar in the header section place buttons that will move forward and backward by a year place a button in the header that will allow the user to return to the current day (or current month What the calendar needs to look like: [ fig 2 ] My current code is in seperate files the js file, html file, and css file. The code needs to stay in the seperate files. How do I modify my current code to display the new calendar? js file code: var thisDay = new Date(); var currentDay = thisDay; /* Write the calendar to the element with the id "calendar" */ document.getElementById("calendar").innerHTML = createAnnualCalendar(currentDay); function createAnnualCalendar(calDate) { var calendarHTML = ""; calendarHTML += putControlBar(); calendarHTML += "<table id='calendar_table'>"; for (var i = 0; i < 12; i++) { calDate.setMonth(i); calendarHTML +=…arrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr