1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
wlad13 [49]
4 years ago
14

Create a variable ‘temp’ and assign the value in Celsius. Display the message ‘It’s extremely hot day today!’ if the temperature

is greater than 40oC otherwise, displays ‘It’s not too hot!
Computers and Technology
1 answer:
Likurg_2 [28]4 years ago
3 0

Answer:

This code is written using C++

Comments are used for explanatory purpose

Program starts here

#include<iostream>

using namespace std;

int main() {

int temp;

//Prompt user for input

cout<<"Enter temperature (in Celcius): ";

//Check if input is acceptable

while(!(cin>>temp)) {

cout << "That was invalid. Enter a valid digit: "<<endl;

cin.clear(); // reset the failed input

cin.ignore(123,'\n');//Discard previous input

}

//Check if temp is greater than 40

if(temp>40) {

cout<<"It's extremely hot day today!";

}

else{//If otherwise

cout<<"It's not too hot!";

}

return 0;

}

//End of Program

You might be interested in
Assign courseStudent's name with Smith, age with 20, and ID with 9999. Use the PrintAll member function and a separate cout stat
agasfer [191]

Answer:

Following are the program in c++

;#include <iostream> // header file

#include <string>

using namespace std;

class student // class

{

   public:

   int ID,age ; // variables

   string courseStudentsname;

   student() // constructor initialize the member

   {

     courseStudentsname="Smith";

     age=20;

     ID=9999;

   }

   void PrintAll() //PrintAll()  function

   {

cout << "Name: " <<courseStudentsname;

cout << ", Age: " << age;

cout << ", ID: " << ID;

}

};

int main() // main function

{

   student e; // create object and call default constructor

   e.PrintAll(); // call the PrintAll() function

   return 0;

}

Explanation:

In the given program we create a three variable inside the class student and declared three variable  ID,age of int type and courseStudentsname of string type after that we create  a constructor and initialize them as value is given in question and finally create a  PrintAll member function which  separate cout statement to output .In the main function create a object class student and call the PrintAll function.

Output:

Name: Smith, Age: 20, ID: 9999

7 0
3 years ago
Read 2 more answers
The Tell Me feature also includes access to the _____ feature.
Ierofanga [76]

Answer:

the quick access toolbar can be customized to include additional commands such as. -"tell me what you want to do" box ... custom programs or additional commands that extend the functionality of a Microsoft office program ... in the open window. it also includes ribbon display options and control buttons that enable you to ...

Explanation:

7 0
3 years ago
The domain name service (dns is a distributed database that allows users to communicate with each other computers by:
Lorico [155]
Translating human-friendly names to addresses that computers need, and translating addresses to names, too.
8 0
3 years ago
You are the IT administrator for a small corporate network. The network uses a DHCP server for IP address configuration for most
Vsevolod [243]

Explanation:

A workstation must request addressing information from a DHCP server.

It can deliver a DNS server address in addition to the host IP address.

Explanation

DHCP servers deliver IP addresses as well as other host configuration information to network hosts. DHCP can be configured to assign any available address to a host, or it can assign a specific address to a specific host. DHCP clients, typically workstations, must send a request to a DHCP server before it will send IP addressing information to them.

6 0
3 years ago
How can i underline a simple text on word?
Fiesta28 [93]

Answer:

Underneath the font box there should be a capital U that is underlined.

Highlight the text you want to underline and click the U button.

6 0
3 years ago
Read 2 more answers
Other questions:
  • After applying transitions to his presentation, Omar uses the Slide Show feature to view the them. He notices that the transitio
    9·2 answers
  • List seven basic internal components found in a computer tower
    13·1 answer
  • If an occupation is projected to decline by 7% over the next 10 years, how would you rate the job outlook?
    15·1 answer
  • "Select the computing device that uses a limited version of an operating system and uses a web browser with an integrated media
    12·1 answer
  • Does anyone know how to connect a nintendo switch to a laptop?
    10·2 answers
  • (20points)
    6·1 answer
  • Drag the tiles to the correct boxes to complete the pairs.
    13·1 answer
  • Google Slides is most similar to which of the following programs?
    10·2 answers
  • (50 POINTS!) Type the correct answer in the box.
    11·1 answer
  • The format that you will use on your works cited page when the entry is longer than one line is__________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!