Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
bartleby

Concept explainers

Question
Book Icon
Chapter 5, Problem 4E
Program Plan Intro

Program plan:

  1. A class DailyTemps is created.
  2. The variable tot of type int is used to contain the total temperature values which is initialized to 0.
  3. The variable temperature of type int is used to store the valid values of temperature.
  4. The variable count of type int is used to store the count of temperatures entered and initialized to 0.
  5. A while loop is used to prompt a user for a series of temperature and end when user enters “999” as temperature.
  6. A if loop is used for checking the valid range of temperatures.

Program description:

The main purpose of the program is used to find the two largest values among 10 digits.

Blurred answer
Students have asked these similar questions
I am trying to create a application that generates a random number in the range of 1 through 100 and asks the user to guess what the number is.  If the user’s guess is higher than the random number, the program should display “Too high, try again.”  If the user’s guess is lower than the random number, the program should display “Too low, try again.”  If the user guesses the number, the application should congratulate the user and then generate a new random number so the game can start over.  Accumulate the guesses until the user guesses the number.  When the user correctly guesses the random number, the program should display the number of guesses they took.  "You guessed the number in # guesses", where # is the number of guesses it took.  And the programming language i am using is visual basic or vb.net 2019 edition
Write a program in C# Write an application named DailyTemps that continuously prompts a user for a series of daily high temperatures until the user enters a sentinel value of 999. Valid temperatures range from -20 through 130 Fahrenheit. When the user enters a valid temperature, add it to a total; when the user enters an invalid temperature, display the error message:Valid temperatures range from -20 to 130. Please reenter temperature.Before the program ends, display the number of temperatures entered and the average temperature.
create an application that will find the largest and the smallest number of a series of integers input by the user. Assume that the user will input only integers that are between -100 and 100 (both inclusive) (no need to validate the input). When the user inputs 101, the application should output the smallest and the largest number.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning