The function should return a value

Assignment Help C/C++ Programming
Reference no: EM13166040

Write a user defined function(no main routine is required here) that would print a message on the screen based on the "naughty or nice"score calculated in question. The score is passed by value to the function, which has the following prototype;
int payoff(double score);

The message for scores between 0 and 10 are as follows

Score    message

0-2.5    santa likes nice kid

2.5-5.0 santa will deliver you more gifts

5.0-7.5 you will receive nice present

7.5-10   any of your wish sill become ture

The function should return a value of 1 when it is given a valid score to process and 0 when the received value is out side of the 0-10 range. In this case it should print a waring message on the screen

Reference no: EM13166040

Questions Cloud

The staffs need a program that can determine : The staffs need a program that can determine whether children have been naughty or nice. individual data files(can be any name) for each childred are available that consist of 368(365+3)integer number each.
State titrant are required to reach the equivalence point : The pH of the HF solution before titrant is added is 1.88 and 43.948 mL of titrant are required to reach the equivalence point.
P, does the congruence x^2 congruent to -1 mod p : 1. For what prime numbers, p, does the congruence x^2 congruent to -1 mod p have exactly 2 solutions mod p. Prove it.
How many physical changes occur : when a mixture at 273 K is heated to 473 K, how many different chemical changes occur? How many physical changes occur?
The function should return a value : The function should return a value of 1 when it is given a valid score to process and 0 when the received value is out side of the 0-10 range. In this case it should print a waring message on the screen
Express the number of pills numerically in decimal form : A patient needs to take 375 of ibuprofen twice daily. The pills in the bottle are each 250. . How many pills does the patient need to take each time she wants the 375 dosage? Assume that these pills are scored and can be cut in half if necessary.
State process is irreversible due to frictional losses : A stream of propane is throttled from 20 bar and 518 K to 0.42 bar. This process is irreversible due to frictional losses at the nozzle.
. find all reduced relations to x^2 congruent : 1. Use (2136)^2 congruent (6109)^2 mod 13289 to find a factor of 13289. 2. Find all reduced relations to x^2 congruent 624 mod 194297 (use code if possible)
Calculation the distance and time printed on the screen : After each calculation the distance and time printed on the screen and accumulated to the sum of the total distance and sum of the total time. The current destination should be saved as the old postion for the next calculation

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Multiply a set of complex numbers

Write a C program to multiply a set of complex numbers stored in an array (that has been dynamically allocated). Specifically, first prompt the user to enter how many complex numbers need to be multiplied, dynamically create an array to store the ..

  Demonstrate the construction and output of an array

In fluid mechanics, the Reynolds number (Re) is a dimensionless quantity that is used to help predict similar flow patterns in different fluid flow situations. For example, Reynolds numbers can be computed for different velocities of fluid flow over ..

  Project

Unit 3 Individual Project SSCI210 – 1304B – 01 A typical individual who commits who commits hate crimes whether it is against or aimed at the Gay/lesbian community , the persons of color or the Jewish community, ( I mention these three because they a..

  Given a character code to indicate the type of customer

Pete's Plumbing of Pompey sells to both retail and wholesale buyers. The retail buyer must pay New York State and Onondaga County sales tax (8%). However, the wholesale buyer does not pay sales tax and receives a volume discount on the amount purchas..

  In psuedocode, design an application

In psuedocode, design an application that has an array of at least 20 integers. It should call a module that uses the sequential search algorithm to locate one of the values

  Design is known, what advantages does keeping

Given that the design is known, what advantages does keeping the source code unavailable give the company and those who purchase the software? What disadvantages does it cause?

  Calculates different formulas that converge to the number pi

Write a C program (Care should be taken not to use extensions of C + + language in your work ) that calculates different formulas that converge to the number  pi,  to compare the speed of convergence of these formulas. Each form will be calculated by..

  Write a scanf statement to read in one number (int

1) Write a scanf statement to read in one number (int), and another statement to print out that number.

  Create class having constructor to recieve two ints

Create a class (in C++)named Card. The class should have two int data members named face and suit.The class should have a constructor that recieves the two ints and uses them to initialize the data members.

  Create a class called point3d

Create a class called Point3D to represent 3D point in space, a class called Sphere and a class called Cylinder. The sphere is characterized by its center point and the radius while the Cylinder can be characterized by its center point, radius and he..

  Computer programming using c language lab

Computer programming using c language lab

  A robot can take steps of 1 meter

A robot can take steps of 1 meter, 2 meters, or 3 meters. Write a recursive function to calculate the number of ways the robot can walk n meters. (n is an integer obtained from user.) As example:

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd