subject

Write C++ statements to do the following:a) Declare int variable num1 and num2.b) Prompt the user to input two numbers. c) Assign the first input number to num1 and the second input number to num2d) Output num1, num2, and 2 times (num1 minus num2). Your output must identify each variable name followed by its value, then the expression for 2 times (num1 minus num2) followed by its value.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 17:00
Anew author is in the process of negotiating a contract for a new romance novel. the publisher is offering three options. in the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. in the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. in the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000. the author has some idea about the number of copies that will be sold and would like to have an estimate of the royal- ties generated under each option. write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. the program then outputs he royalties under each option and the best option the author could choose. (use appropriate named constants to store the special values such as royalty rates and fixed royalties.
Answers: 1
question
Computers and Technology, 25.06.2019 09:20
Part d: float check string has a method s.isdigit() that returns true if string s contains only digits and false otherwise, i.e. s is a string that represents an integer. write a function named float_check that takes one parameter that is a string and returns true if the string represents a float and false otherwise. for the purpose of this function we define a float to be a string of digits that has at most one decimal point. note that under this definition an integer argument will return true. remember “edge cases” such as “45.” or “.45”; both should return true. for example: float_check('1234') returns true float_check('123.45') returns true float_check('123.45.67') returns false float_check('34e46') returns false float_check('.45') returns true float_check('45.') returns true float_check('45..') returns false
Answers: 2
question
Computers and Technology, 25.06.2019 10:00
Aline ab is in 1st quadrant , its ends a and b respectively are 20mm and 60mm infront of vp respectively . the distance between the end projectors is 75 mm . the line is inclined at 30 degrees to the hp and end a 20 degrees above the hp . draw its projections , find true length
Answers: 2
question
Computers and Technology, 26.06.2019 05:00
It's expected that, by 2016, there will be almost global network connections. twelve billion nineteen billion three trillion none of the above
Answers: 1
You know the right answer?
Write C++ statements to do the following:a) Declare int variable num1 and num2.b) Prompt the user to...
Questions
question
Mathematics, 21.05.2021 20:50
question
Mathematics, 21.05.2021 20:50
question
Mathematics, 21.05.2021 20:50
question
Mathematics, 21.05.2021 20:50
question
Mathematics, 21.05.2021 20:50
question
Mathematics, 21.05.2021 20:50
Questions on the website: 13722361