change normal body temperature to 36.5–37.5 °C #include using namespace std; int main() { float temp; cout<<"Enter the body temperature in Celsius\n"; cin>>temp; if (temp>=37) { cout<<"The quarantine of the patient is required\n"; cout<<"Enter the name of the patient\n"; string patient; cin>>patient; cout<<"Where the passenger is from\n"; string place; cin>>place; cout<
Q: 1. [LO 1, LO 2, LO 3 & LO 4, Treasure Hunter Description You are in front of a cave that has…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: (Financial application: payroll) Write a program that reads the following infor- mation and prints a…
A: CODE:- # Get the employee's namename = input("Enter employee's name: ")# Get the number of hours…
Q: The following declaration, program, and program segment has errors. Locate as many as you can.…
A:
Q: Language: JAVA Leap-Year Write a program to find if a year is a leap year or not. We generally…
A: import java.io.*;import java.util.*;class LeapYear { public static void main(String args[]) throws…
Q: Celsius Temperature Table //write code under void challenge and create function The formula for…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Activity #2: Taking limits to compute derivatives Write a program named Lab5a_Act2.py to compute a…
A: Actually. Python is a easiest programming language. It is a dynamically typed programming language.
Q: #include using namespace std; void myfunction(int num2,int num1); int main(){ myfunction(5,2);…
A: Please find the answer below :
Q: Assignment Description This program will simulate part of the game of Yahtzee! This is a dice…
A: Python code: yahtzee.py:
Q: #include using namespace std; void myfunction(int num2, int nu int main(){ myfunction(5,2); return…
A: Function declaration is done in the third line saying myfunction accepts two integer parameters and…
Q: C CODE PLEASE 3.28 Fixed LAB: Warm up: Automobile service cost (1) Prompt the user for an…
A: Introduction: C CODE PLEASE 3.28 Fixed LAB: Warm-up: Automobile service cost (1) Prompt the…
Q: 1. The circle has two data members, a Point representing the center of the circle and a float value…
A: #include<stdio.h>#include<math.h> typedef struct{ float x; float y;}Point; typedef…
Q: Write a program that lets the user enter the loan amount and loan period in number of years and…
A: Please find the answer below :
Q: 15. Overloaded Hospital Write a program that computes and displays the charges for a patient's…
A: Required:
Q: *3.1 (Algebra: solve quadratic equations) The two roots of a quadratic equation ax? + bæ + c = 0 can…
A: Code: import java.lang.Math;import java.util.Scanner; class Roots{public static void main(String…
Q: (Return number of digits) Write a function that returns the number of digits in an integer using the…
A: program approach returns number of digits if number is 0 return 1 else to hold count of number…
Q: Function #1: superman Parameters: height - an integer representing the user's height in inches…
A: Solution:Superman() function:#Define the functiondef superman(input_inches): #Declare the…
Q: Assignment Write a program that calculates the revenue of a trip of a train composed of several…
A: Dear Student, As no programming language is mentioned so, I am coding it in c++. I will also provide…
Q: C++ program where a user can input his weight and height and the program suggests him a suitable…
A: C++ used to answer this question
Q: Write a program that calculates your grade in this class based on weights for each category and…
A: Algorithm Start Recieve input score from user for reading assignment and assign it to a variable(…
Q: C++ Angle Calculator Write a program that asks the user for an angle, entered in radians. The…
A: C++ Angle Calculator Write a program that asks the user for an angle, entered in radians. The…
Q: Lab 5B-Value Returning Functions Falling Distance When an object is falling because of gravity, the…
A: Here I have created a file named distance.py. Inside this, I have created a function named…
Q: Develop a C# application that inputs one salesperson’s items sold for the last week, then calculates…
A: Hello Student. Warm welcome from my side. Hope you are doing great . I will try my best to answer…
Q: a. A program that accepts data for one auctioned item. Display data for an auction only if the…
A: *As per the company norms and guidelines we are providing first three sub parts of the given…
Q: The Barking Lot is a dog day care center. Design a flowchart or pseudocode for the following: A…
A: Flow chart is a step by step process in which the algorithm is represented in a flow using the…
Q: An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance…
A: Program approach: Import Scanner package for input. Create a class. Create the main method. Create…
Q: #includeusing namespace std;main(){int myarray[20] ;int sum =0;for ( int i=0; i<20 ; i++) cin <<…
A: Answer: FALSE The program is wrong and has many errors. The correct program is:
Q: Create class Employee. • Use static variable annualTaxRate to store the annual tax rate for all…
A: These programs can be asked from control statements, array, string, oops etc. Java basic programs…
Q: 7.5 LAB: Name format Many documents use a specific format for a person's name. Write a program…
A: The error is generated because the program is given only one input and then expects the output. But…
Q: *2.25 (Financial application: payroll) Write a program that reads the following infor- mation and…
A: The complete code with output given below.
Q: Q5: Complete the function that calculates the position of an object at any time t> 0. The initial…
A: Input : Given the s0,u0, a, and t. Output : Value of position.
Q: A catalog listing for a textbook consists of the authors’ names, the title, the publisher, and the…
A: Dear Student, strcpy must be under the main function, even the declarations Corrected code is given…
Q: A(n) __________ is the part of a program in which a variable may be accessed.a. declaration spaceb.…
A: A scope is the part of a program in which a variable may be accessed.
Q: Code in PHP. RULE: Cannot use array and functions !!! User can show all of the data entered from the…
A: The above functionality can be achieved by storing the first name and last name in a variable and…
Q: Activity #2: Taking limits to compute derivatives Write a program named Lab5a_Act2.py to compute a…
A: Since you are asking multiple questions, we are answering first question for you. If you want…
Q: 4.23 (Financial application: payroll) Write a program that reads the following information and…
A: C code#include<stdio.h>#include<string.h> int main(){char employeeName[20]="";double…
Q: o Calculate state withholding tax ( stateTax ) at 6.5 percent o Calculate federal withholding tax (…
A: #include <iostream>using namespace std;int main(){ double salary = 1250.00; double…
Q: Why is the code I wrote wrong? Could someone explain why? I do not understand why.
A: The program needs to take care of the special case of user input '-' (dash). The program is divided…
Q: Develop a body mass index (BMI) caleultor program that reads body weight and height as inputs and…
A: The complete C program is shown below. Sample Response: //C program#include<stdio.h>//main…
Q: int main(int argc, char **argv) { float *rainfall; float rain_today; // rainfall has been…
A: Here is the answer:-
Q: The Barking Lot is a dog day care center. Design a flowehart or pseudocode for the following: . A…
A: Pseudo code is used to write an algorithm in normal english language without using the manual or…
Q: The Barking Lot is a dog day care center. Design a flowchart or pseudocode for the following: d.…
A: Pseudocode :- start Declaration num idNm String nme String breed num age num weigh num bil num QUIT…
Q: A BOOKSTORE SELLS BOOKS UNDER THE FOLLOWING CONDITIONS: a. IF THE CLIENT IS TYPE 1, 30% IS…
A: Objective: This program reads user data about some book purchases and displays the information after…
Q: #include #include #include using namespace std; int main() { int monthlyUsage[12]; double…
A: Process Explanation : The above C++ code is used for calculating consumption of electricity in each…
Q: Module/Week 7 ASSIGNMENT (ARRAYS)Use functional decomposition to write a C++ program that asks the…
A: This C++ program is used to calculate the user's weight according to the planet. To calculate…
Q: Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used…
A: Below is the required C++ program: - Explanation: - Importing the header files and the namespace.…
Q: : Correct the syntax errors void Main () { int x, Y; const a = 14; ww w cin >> x , y; ww if a=x*y;…
A: Things needed to be remember:- c++ is a case sensitive programming language. if you need to use…
Q: Summary 2 EmployeeBonus.py - This program calculates an emplo productivity bonus. 3 In this lab, you…
A: Decision making is needed to execute a code or block of statements only if a certain condition is…
Q: This program determines if an airline passenger is // eligible for a 25% discount.
A: There are two ways to find eligibility of a passenger for a 25% discount on the basis of age Using…
Q: Activity 20 Electric Bill: Using Switch Statement, write a program that will calculate and show…
A: Solution :: #include <iostream> using namespace std; int main(void){ // Your code here!…
change normal body temperature to 36.5–37.5 °C
#include<iostream>
using namespace std;
int main()
{
float temp;
cout<<"Enter the body temperature in Celsius\n";
cin>>temp;
if (temp>=37)
{
cout<<"The quarantine of the patient is required\n";
cout<<"Enter the name of the patient\n";
string patient;
cin>>patient;
cout<<"Where the passenger is from\n";
string place;
cin>>place;
cout<<patient<<" from "<<place<<"is to be quarantined at Hospital";
}
cout<<"Normal temperature\n";
}
Step by step
Solved in 3 steps with 2 images
- In C++ QUESTION 14 class rectangleType { public: void setLengthWidth(double x, double y); //Sets the length = x; width = y; void print() const; //Output length and width double area(); //Calculate and return the area of the rectangle (length*width) double perimeter(); //Calculate and return the perimeter (length of outside boundary of the rectangle) private: double length; double width; }; Write the function definition for the function perimeterpizza (python)Mario owns a pizzeria. Mario makes all of his pizzas from 10 different ingredients, using 3 ingredients on each pizza. Mario’s cousin Luigi owns a pizzeria as well. Luigi makes all his pizzas from 9 ingredients, using 4 ingredients on each pizza. Mario and Luigi have made a bet: Mario believes that customers can order a larger selection of pizzas in his pizzeria than they can order in Luigi’s pizzeria. Use functions for this assignment. Implement a factorial() function yourself (do not use the one from the math module) When choosing k items from n possible items, the number of possibilities can be obtained using the following formula: (??)=?!?!(?−?)!(nk)=n!k!(n−k)! Make a function called choose with two parameters n and k, that implements the above formula. Write a program that calculates the number of pizzas Mario and Luigi can make. The outcome should look like this: Mario can make 120 pizzas.Luigi can make 126 pizzas. Luigi has won the bet.FOR C++, ACCORDING THE VEHICLE HEADER, FILL THE PART 1 OF THE CODE #ifndef _Vehicle_hh_ #define _Vehicle_hh_ class Vehicle { private: float speed; float mile; public: Vehicle(); Vehicle(float, float); float getSpeed(); float getMile(); void setSpeed(float); void setMile(float); void print(); }; #endif (DEFINE FUNCTIONS CORRESPONDING TO VEHICLE HEADER CLASS IN PART 1 BELOW) #include "Vehicle.hh" #include "Ship.hh" #include <iostream> using namespace std; // *** DEFINE --VEHICLE-- FUNCTIONS FOR PART 1 *** // *** DEFINE --SHIP-- FUNCTIONS FOR PART 2 *** void reduceSpeed(Ship*, float); void takePassenger(Ship*, int); int main() { return 0; } // reduce the speed of ship given in percentage (0 < percentage < 1). void reduceSpeed(Ship *s, float percentage) { // *** FILL THIS FUNCTION FOR PART 3 *** } // takes the number of passengers to the ship void takePassenger(Ship *s, int pas) { // *** FILL THIS FUNCTION FOR…
- (Card Shuffling and Dealing) Create a program to shuffle and deal a deck of cards. Theprogram should consist of class Card, class DeckOfCards and a driver program. Class Card shouldprovide:a) Data members face and suit of type int.b) A constructor that receives two ints representing the face and suit and uses them to initialize the data members.c) Two static arrays of strings representing the faces and suits.d) A toString function that returns the Card as a string in the form “face of suit.” Youcan use the + operator to concatenate strings.Class DeckOfCards should contain:a) An array of Cards named deck to store the Cards.b) An integer currentCard representing the next card to deal.c) A default constructor that initializes the Cards in the deck.d) A shuffle function that shuffles the Cards in the deck. The shuffle algorithm shoulditerate through the array of Cards. For each Card, randomly select another Card in thedeck and swap the two Cards.e) A dealCard function that returns the next…=======================================================================PSET_3 - DESCRIPTION for JAVA PROGRAMMING SET 3=======================================================================The monthly payment on a loan may be calculated by the following formula:Rate * (1 + Rate)^NPayment = ----------------------- * L [note 1]( ( (1 + Rate)^N ) - 1)Rate is the monthly interest rate--expressed as a decimal value,which is the annual interest rate divided by 12.(12% annual interest would be 1 percent monthly interest.) [note 2]N is the number of payments, and ...L is the amount of the loan.-----------------------------------------------------------------------Note 1: '^' means exponentiation; a^b means a to the power of bHint: Use the pow() function in the Math Library.Note 2: To convert from percent to decimal ...Divide the percent value by…=======================================================================PSET_3 - DESCRIPTION for JAVA PROGRAMMING SET 3=======================================================================The monthly payment on a loan may be calculated by the following formula:Rate * (1 + Rate)^NPayment = ----------------------- * L [note 1]( ( (1 + Rate)^N ) - 1)Rate is the monthly interest rate--expressed as a decimal value,which is the annual interest rate divided by 12.(12% annual interest would be 1 percent monthly interest.) [note 2]N is the number of payments, and ...L is the amount of the loan.-----------------------------------------------------------------------Note 1: '^' means exponentiation; a^b means a to the power of bHint: Use the pow() function in the Math Library.Note 2: To convert from percent to decimal ...Divide the percent value by 100.-----------------------------------------------------------------------=======================================================================…
- Order check Write a program OrderCheck.java that takes four int command-line arguments w, x, y, and z. Define a boolean variable whose value is true if the four values are either in strictly ascending order (w < x < y < z) or strictly descending order (w > x > y > z), and false otherwise. Then, display the boolean variable value.C++ simple friend function.Create a C++ class called cube that calculates the volume of a cube. Use appropriate accessors (getters) and mutators (setters), constructors, etc. Your program must also include a friend function that will sum the volume of two cube class instances.Output the individual volumes of each of the two cube classes and then the total volume from the friend function. Example of friend funtion #include <iostream> using namespace std; class Box { double width; public: friend void printWidth( Box box ); void setWidth( double wid );}; // Member function definitionvoid Box::setWidth( double wid ) { width = wid;} // Note: printWidth() is not a member function of any class.void printWidth( Box box ) { /* Because printWidth() is a friend of Box, it can directly access any member of this class */ cout << "Width of box : " << box.width <<endl;} // Main function for the programint main() { Box box; // set box width…c++ Assignment Write a program that calculates the damage inflicted by a weapon against a target. The user will first enter the hit point of the target as well as its bludgeoning (ezici) armor and piercing (delici) armor, all as integers. Then the type of the weapon will be given as a char followed by the durability and damage of the weapon both as integers. The type of the weapon can EITHER be ‘b’ representing bludgeoning or ‘p’ representing piercing weapon. Based on the type, the user will give a final input; if it is a bludgeoning weapon, a material value as a string; if it is a piercing weapon, a thickness value as a double. After getting all this input, the program will simulate 5 consecutive attacks at the target with the given weapon and print out the final hit point of the target as an integer. The attack works differently for the type of the weapon as below and after each attack the weapon can be destroyed: If it is a bludgeoning weapon: dmg= (weapon damage-bludgeoning…
- Language is c++ Assignment 6 C: Minesweeper - Simplified. For many years, computers sold with the Windows operating system would contain a game called M inesweeper. The player would be presented with a grid, where they would have to click an empty part of the map. If they clicked on a hidden mine, the game would be instantly over. However, if they clicked a safe spot, a hint about nearby mines would be displayed and the player would click another spot. The goal would be to flag all the hidden mines without hitting one. (As an aside, many people did not know these rules and just clicked around randomly until they hit a mine)We will be developing a simplified version of this game. You will prompt the user for a grid size and then created a 2D array with equal width and height (C++ students: Check the Appendix for more information on how to do this). You will initialize the 2D char array with each element equallying a ‘?’ symbol. You will then randomly generate one “mine” value per…Parking Charges Program in java Write a program that works out the amount a person has to pay for parking in a car park in a tourist town. If they say they are disabled, they are told it is free. Otherwise they enter the number of hours as a whole number (1-8) that they wish to park as well as whether they have an “I live locally” badge or are an old age pensioner both of which leads to a discount. The program tells them the cost to park. The calculation is done in this program as follows. If they are disabled it is free. Otherwise ... Take number of hours they wish to park and give a basic charge: • • • • 1 hour: 3.00 pounds 2-4 hours: 4.00 pounds 5-6 hours: 4.50 pounds 7-8 hours: 5.50 pounds Next modify the resulting charge based on whether they are local or not: • If local: subtract 1 pound If OAP: subtract 2 poundsYour program MUST include methods including ones that - asks for the hours and returns the basic charge. - asks whether they live locally /…SUBJECT: PROGRAMMING FUNDAMENTELS LAB IT provides best solutions for manual work that makes life easier .Suppose a university wants to manage its data in the form of software. Being a programmer you have been asked to create the following structures in C. 1. Student: a. Name b. RegId c. Enrolled courses (Labs + Theory) d. Department e. Semester2. Faculty: a. Name b. Department c. Designation d. Salary:Implement the following scenario using functions: setMarks(): This function will allow faculty members to set Student marks. getGpa(): Takes students as an argument and calculates the student’s GPA. displayStudent(): display the given student’s information. displayFaculty(): display the given faculty’s information. NOTE ; KINDLY PROVIDE THE ANSWER OF THIS QUESTION IN C LANGUAGE ASAP