-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 0 replies
- 2 views
-
Microsoft Loop 2.0 comes with a revamped UI and several improvements
By pradeepviswav,
- microsoft
- microsoft loop
- (and 5 more)
- 0 replies
- 0 views
-
Microsoft Loop adds support for sharing workspaces. pages and more with guest users
By John Callaham,
- microsoft
- microsoft 365
- (and 2 more)
- 0 replies
- 0 views
-
Microsoft Loop tables now support custom in-app update notifications
By John Callaham,
- microsoft
- microsoft 365
- (and 2 more)
- 0 replies
- 0 views
-
Microsoft Loop has added more functions for its boards such as expanding them into margins
By John Callaham,
- microsoft
- microsoft loop
- (and 2 more)
- 3 replies
- 0 views
-
Question
lzone
hi, i am a beginner and i have 2 quesion
1. Use for loop to write the C++ program that display the integers from 0 to 50.
2. Write the C++ program that displays the message "Input error" when a user enters an integer less than or equal to 0 for the integer variable called units.
3. Modify the C++ program in exercise 2 such that it displays the message "Input error" when a user enters 0 or less for the variable called units; otherwise, it computes the total owed by multiplying the units by 5 and stores this product into the variable called total, and then displays the total value.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. Write the C++ program that prompts a user to enter an integer value as follows: Enter an integer: The program takes the user-input integer value and stores it into the variable called x. The x variable has the int data type. The program then displays the user-input integer value as follows if the user-input integer value is 8: The integer you have just entered is: 8
2. Modify the above C++ program such that it computes the user input value plus 3, and the result times 9. The program then displays the computation result as follows if the user-input integer value is 8: The integer you have just entered plus 3, then the result times 9: 99
3. Write the C++ program that takes a user-input value and stores it into the variable called Celcius. The Celcius variable has the float data type. The program then converts the user input into a new value based on the following formula, stores the new value into the float variable called Fahrenheit and displays the Fahrenheit value: Fahrenheit = Celcius × 5/9 + 32
please help
thank you
Link to comment
https://www.neowin.net/forum/topic/1280348-c-simple-question/Share on other sites
1 answer to this question
Recommended Posts