Question

ASP.Net with VISUAL C# Use an appropriate looping statment to write a program that prints a...

ASP.Net with VISUAL C#

Use an appropriate looping statment to write a program that prints a list of the Celsius equivalents of zero degrees Fahrenheit through100 degrees Fahrenheit. To convert Fahrenheit to Celsius, subtract 32 from the Fahrenheit temperature, and then multiply the remainder by .55.

Homework Answers

Answer #1

ASP.Net Code:

File: Site.Master.designer.cs

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace temperaturesConversion {
  
  
    public partial class SiteMaster {
      
        /// <summary>
        /// HeadContent control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.ContentPlaceHolder HeadContent;
      
        /// <summary>
        /// MainContent control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent;
    }
}

File: Default.aspx.designer.cs

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace temperaturesConversion {
  
  
    public partial class _Default {
      
        /// <summary>
        /// conversionTable control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Table conversionTable;
    }
}

File: Default.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace temperaturesConversion
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            for (int i = 0; i <= 100; i++)
            {
                //Creating a Row
                TableRow row = new TableRow();

                //Creating cells
                TableCell fh = new TableCell();
                TableCell cel = new TableCell();

                //Adding text to cells
                fh.Text = i.ToString();
                cel.Text = ( (i - 32) * 0.55 ).ToString() ;

                //Adding cells to current row
                row.Cells.Add(fh);
                row.Cells.Add(cel);

                //Adding row to table
                conversionTable.Rows.Add(row);
            }
        }
    }
}

------------------------------------------------------------------------------------------------------------------------------------------------------------

Sample Run:

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Program must be in JAVA. Write a program that converts temperature from Celsius to Fahrenheit or...
Program must be in JAVA. Write a program that converts temperature from Celsius to Fahrenheit or vice versa, depending on user's input. The formula for converting temperature in Celsius to Fahrenheit is, Fahrenheit = (9/5) * Celsius + 32 The formula for converting temperature in Fahrenheit to Celsius is, Celsius = (5/9) * (Fahrenheit – 32) Results should be rounded to two decimal points, e.g., 92.56
(1 point) Temperatures in LA. The average daily high temperature in November in Los Angeles is...
(1 point) Temperatures in LA. The average daily high temperature in November in Los Angeles is 73 degrees Fahrenheit with a standard deviation of 5 degrees Fahrenheit. Suppose that the temperatures in November closely follow a normal distribution. Round calculated answers to 4 decimal places. 1. What is the probability of observing an 78 degrees Fahrenheit temperature or higher in Los Angeles during a randomly chosen day in November? 2. How cold are the coldest 5% of the days during...
Temperatures in LA. The average daily high temperature in March in Los Angeles is 70 degrees...
Temperatures in LA. The average daily high temperature in March in Los Angeles is 70 degrees Fahrenheit with a standard deviation of 5 degrees Fahrenheit. Suppose that the temperatures in March closely follow a normal distribution. Round calculated answers to 4 decimal places. 1. What is the probability of observing an 75 degrees Fahrenheit temperature or higher in Los Angeles during a randomly chosen day in March? .1586 2. How cold are the coldest 5% of the days during March...
Temperatures in LA. The average daily high temperature in January in Los Angeles is 68 degrees...
Temperatures in LA. The average daily high temperature in January in Los Angeles is 68 degrees Fahrenheit with a standard deviation of 5 degrees Fahrenheit. Suppose that the temperatures in January closely follow a normal distribution. Round calculated answers to 4 decimal places. 1. What is the probability of observing an 76 degrees Fahrenheit temperature or higher in Los Angeles during a randomly chosen day in January? 2. How cold are the coldest 20% of the days during January in...
Temperatures in LA. The average daily high temperature in February in Los Angeles is 69 degrees...
Temperatures in LA. The average daily high temperature in February in Los Angeles is 69 degrees Fahrenheit with a standard deviation of 5 degrees Fahrenheit. Suppose that the temperatures in February closely follow a normal distribution. Round calculated answers to 4 decimal places. 1. What is the probability of observing an 74 degrees Fahrenheit temperature or higher in Los Angeles during a randomly chosen day in February? (?) 2. How cold are the coldest 15% of the days during February...
C program- using visual studio code. Write a program that asks for an integer and then...
C program- using visual studio code. Write a program that asks for an integer and then prints all the alternative integers from (and including) that value up to (and including) a value larger by 20. (That is, if the input is 5, the output runs from 5 to 25.) Be sure to separate each output value by a space or tab
C++ Fahrenheit to Celsius Tables Write a program that first asks the user which Temperature scale...
C++ Fahrenheit to Celsius Tables Write a program that first asks the user which Temperature scale conversion he/she would like to perform: 1. Convert F to C 2. Convert C to F 3. Quit What is your choice? Then it asks the user for input for three real number variables: start_temp, end_temp, temp_incr. It will then produce a two column Fahrenheit to Celsius table or a two column Celsius to Fahrenheit table, depending on the choice. For choice 1, the...
In c++ format please Most people know that the average human body temperature is 98.6 Fahrenheit...
In c++ format please Most people know that the average human body temperature is 98.6 Fahrenheit (F). However, body temperatures can reach extreme levels, at which point the person will likely become unconscious (or worse). Those extremes are below 86 F and above 106 F. Write a program that asks the user for a body temperature in Fahrenheit (decimals are ok). Check if that temperature is in the danger zone (for unconsciousness) or not and produce the relevant output shown...
Write a program in java that generates a two-column table showing Fahrenheit temperatures from -40F to...
Write a program in java that generates a two-column table showing Fahrenheit temperatures from -40F to 120F and their equivalent Celsius temperatures. Each line in the table should be 5 degrees F more than the previous one. Both the Fahrenheit and Celsius temperatures should be accurate to 1 decimal place. I am not able to use: import java.text.DecimalFormat; Any feedback would be helpful.
C++ PROGRAM. (C++ INTRO QUESTION) Write a program that prints the count of all prime numbers...
C++ PROGRAM. (C++ INTRO QUESTION) Write a program that prints the count of all prime numbers between A and B (inclusive), where A and B are defined as follows: A = 55000 B = A + 5000 Just a recap on prime numbers: A prime number is any number, greater or equal to 2, that is divisible ONLY by 1 and itself. Here are the first 10 prime numbers: 2, 5, 7, 11, 13, 17, 19, 23, and 29. Rules:...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT