Write a program that takes a desired temperature as an


Using visual Studio or Dev C++

Write a program that takes a desired temperature as an input from the user. The temperature must be between 0 and 999 degrees.

If the desired temperature does not contain 1, 4, or 7, then display the desired temperature. If it contains 1, 4, or 7, compute and display the next largest temperature that doesn't contain 1, 4, or 7.

For example, if the desired temperature is 450, then the program should output 500. Similarly, if the desired temperature is 375, then the program should output 380.

In your program, include and use a function named "containsDigit" declared as below. If the entered number contains a digit, the function should return true. Otherwise, the function should return false.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a program that takes a desired temperature as an
Reference No:- TGS02387519

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)