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...
Write a Matlab function convert T such that convert T(x, ’C’) converts from degrees Celsius to...
Write a Matlab function convert T such that convert T(x, ’C’) converts from degrees Celsius to degrees Fahrenheit, while convert T(x, ’F’) converts from Fahrenheit to Celsius. Need to submit program online to see if successful. Please help! function T = convert_T (x, flag) %convert between Celsius and Fahrenheit temperatures %for example, convert_T(10, 'C') should return 50 %and convert_T(50, 'F') should return 10
Use Python: the formula for converting a temperature from Fahrenheit to Celcius is C=5/9(f-32) where F...
Use Python: the formula for converting a temperature from Fahrenheit to Celcius is C=5/9(f-32) where F is the Fahrenheit temperatre and C is the celcius temperature. Write a function named celcius that accepts a Fahrenheit temperature as an argument. the function should return the temperature, convertedm to celcius. Demonstrate the function by calling it in a loop that displays a table of the fahrenheit temperatures 0 through 20 and their Celsius equivalents.
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...
// This program prints a table to convert numbers from one unit to another. // The...
// This program prints a table to convert numbers from one unit to another. // The program illustrates some implementation techniques. //Include the header file ostream for including all stream. ---------------------------------------------------------*/ #include <iostream> //Provides cout <v1.0> //Include iomanip that is used for set precision. #include <iomanip> //Provides setw function for setting output width <v1.1> //Header file for EXIT_SUCCESS. #include <stdlib.h>// Provides EXIT_SUCCESS <v1.2> //Header file for assert. #include <assert.h>// Provides assert function <1.3> using namespace std; // Allows all standard...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT