Using the following program as a guide

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

Using the following program as a guide, write a program reads in 2 scores in the main function.. Calls a function that will triple each number. In the function and the print the result in the main function. //**Defining and calling a function with variable paramters(in and out) //Passes 2 numbers into the function and passes the 2 numbers //back out doubled #include using namespace std; void dblit( int &, int & );//since this is in and out, we need & main() { int score,score2; cin >> score>> score2; dblit( score , score2);// Call the function, since we are // passing 2 numbers back in the list, we are // not returning a number back to the spot, so // the function call is a statement by itself cout << score << " " << score2 << endl; } void dblit( int & num , int & num2) //Need & to make them in and out { num = num * 2; num2 = num2 * 2; // no need for a return, since both number will // // go back in the list. Since we do not have a // // a return, we need void by the function name }

Reference no: EM13168082

Questions Cloud

Explain what is the molar mass of a sample of gas : When hcl and nahco3 are mixed together, a chemical reaction takes place in which a gas is one of the products. What is the molar mass of a sample of gas
Sodium azide are needed to provide sufficient nitrogen gas : How many grams of sodium azide are needed to provide sufficient nitrogen gas to fill a 35.0x35.0x25.0 cm bag to a pressure of 1.20 atm at 26 degress C.
State the air pressure in the tires of an automobile : The air pressure in the tires of an automobile is adjusted to 37 psi in SanDiego, where the air temp is 68F. The air in the tires is at the same temp as the atmosphere
Explain what is the volume of the balloon when it bursts : If the atmospheric pressure at 30 km is 28.0 torr and the temp is -48 C, what is the volume of the balloon when it bursts?
Using the following program as a guide : Using the following program as a guide, write a program reads in 2 scores in the main function.. Calls a function that will triple each number. In the function and the print the result in the main function.
Compute the volume of the bottle could deliver to a climber : calculate the volume of O2 the bottle could deliver to a climber at an altitude where the temp is -38 C and the atmospheric pressure is 0.40 atm.
A "mynum" class that will read "randfile.txt" file : A "MyNum" class that will read "randFile.txt" file and obtain the 20,000 integer numbers
Input a temperature as a floating point : Your program should input a temperature as a floating point number with an appended unit letter. It should then print the temperature in all four of the units above
Explain the total pressure in the flask : determine the total pressure in the flask AND the height difference between the two arms of the manometer.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Allows the user to enter the coefficients for a system

Create a graphical (not text-based) Visual C++ program that allows the user to enter the coefficients for a system of four equations with four unknowns. Include a button that when clicked, will solve the system of equations and display the results in..

  Write a c++ program that prompts the user for a double

Write a C++ program that prompts the user for a double that is either positive or negative.

  Write a method that accepts a string

Write a method that accepts a String object as an argument and displays its contents backward. For instance, if the string argument is "gravity" the method should display - "ytivarg". Demonstrate the method in a program that asks the user to input..

  Lu decomposition with gauss elimination

The LU decomposition with Gauss elimination and what is the physical interpretation of the elements of ? Write C++ programs for steps 2, 3, and 4.

  Submap that accepts two maps from strings

Write a method called subMap that accepts two maps from strings to strings as its parameters and returns true if every key in the first map is also contained in the second map and maps to the same

  User that will be asked to input the time

Write a code for the following C++ problem. We will have a user that will be asked to input the time of a train traveling in terms of minutes and this minutes is a non-negative integer.

  C programme to find the minimum and maximum value

write a c programme to find the minimum and maximum value each elements in each row ,to create table b,having 5 rows and 2 coloums,the first coloum of table b is the maximumvalue and thye second coloum is the maximum value in each row.

  Chess program, enable a monitoring component

Given a chess program, enable a monitoring component to switch planning algorithms at runtime, based on the opposing player's style and response time.

  Write and test c program which outputs waveform

Write and test a C program which outputs waveform which switches from 10.0 kHz with a 50% duty cycle to 25.0 kHz with a 5% duty cycle every 5 seconds.

  Maze program

Maze program. In this assignment you will represent a maze with a binary tree. . The starting point is node N and the ending point is node Z.

  Variables should be private and the class functions public

All the class variables should be private and the class functions public. The class functions should be implemented in a file Inventory.cpp which should be linked with the inventory.hpp file.

  Represent an instruction supported by simpletron

Implementation contains a Simpletron class and several supporting Instruction classes

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