Question
Coding in C# please
Develop the C# program for the following problems: 1. Create a new class and name it as Conversion. 2. In this class, provide
Sample Output#2 Enter a low value: Enter a high value: Enter a step value: Pounds 1.0 3.0 5.0 7.0 9.0 >>> | 1 10 2 Ounces 16.
Enter the first number: 2 Enter the second number: 4 Enter how many times: 6 2 4 6 10 16 26 Please provide the following spec
0 0
Add a comment Improve this question Transcribed image text
Answer #1

//Performing conversion for the units of weight
using System;

public class Conversion
{
   static void main()
   {
       double low, high,step, i;

       Console.WriteLine("Enter the low value: ");
       Console.ReadLine(low);
       Console.WriteLine("Enter the high value: ");
       Console.ReadLine(high);
       Console.WriteLine("Enter the step value: ");
       Console.ReadLine(step);
       Console.WriteLine("   POUNDS   OUNCES   KILOGRAMS");//displaying table headings
       for(i=low;   i<=high; i=i+step)
       {
           Console.WriteLine(i+"\t"+i*16+"\t"+i*453.592);//displaying the table values
       }
   }
}

Add a comment
Know the answer?
Add Answer to:
Coding in C# please Develop the C# program for the following problems: 1. Create a new...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a new NetBeans project called PS1Gradebook. Your program will simulate the design of a student...

    Create a new NetBeans project called PS1Gradebook. Your program will simulate the design of a student gradebook using a two-dimensional array. It should allow the user to enter the number of students and the number of assignments they wish to enter grades for. This input should be used in defining the two-dimensional array for your program. For example, if I say I want to enter grades for 4 students and 5 assignments, your program should define a 4 X 5...

  • *Answer must be in C* Write a complete program as follows (declare any necessary variables): Create...

    *Answer must be in C* Write a complete program as follows (declare any necessary variables): Create an array of doubles named “hummus” with 2 rows and 300 columns. Initialize all array elements to zero. Write a loop that will repeatedly ask the user to enter a value and store it in the first row of the array (do not overwrite previously entered values) until the whole first row is populated with the user input. (hint the loop should have the...

  • Kaprekar C++ program a. Write a c++  code that takes any number between 0 and 9999 as...

    Kaprekar C++ program a. Write a c++  code that takes any number between 0 and 9999 as an input value, and returns the number of iterations it takes that number to reach 6174. Also, it needs to indicate if the number does not converge to 6174. Run the program with three different numbers of your choosing to show that it works. b. Write a second c++ code using the first. However, this new program will calculate how many iterations it takes...

  • Help on coding this in c++. I am confused as how to go about this problems!...

    Help on coding this in c++. I am confused as how to go about this problems! IZzes 1. (Metric - English units Conversion) nferences A metric ton is 35,273.92 ounces. Write a C++ program to read the weight of a box of cereal in ounces then output this weight in metric tons, along with the number of boxes to yield a metric ton of cereal. llaborations at Design: To convert 14 ounces (of cereal) to metric tons, we use the...

  • Please show that it works and show the output. Description Develop a program (in C++) that...

    Please show that it works and show the output. Description Develop a program (in C++) that first asks the user to input a signed number, for example 48, then converts it to binary number by using Two's Complement regulations. Do the same for the second inputted number, eg. 17. Then compute the summation of these two numbers, output the results in binary format first, then if there is an overflow, display error message; otherwise, convert the result to decimal value...

  • In C++ ab 8 DESCRIPTION: Complete all four problems. 1. Write a program that will accept...

    In C++ ab 8 DESCRIPTION: Complete all four problems. 1. Write a program that will accept two numbers from the user. The program should then evaluate the following equation, using the data input: 2-3X2 - 4Y?. Assume the second number input is Y. Now the program should test Z to see if Z is a negative number or a positive number (assume zero is included as a positive number). The program should output the values of X, Y, and Z...

  • Goals: Practicing functions and parameter types. Problem: You are to create a program that will aid...

    Goals: Practicing functions and parameter types. Problem: You are to create a program that will aid in a farmer in monitoring the amount of corn to feed livestock each week. There is a template named "Labs1-5template.cpp" posted on Canvas which you should download and complete. Follow the instructions given in the template and follow the assignment guidelines for the course. Do not use global variables and do not use the same variable name in multiple functions. Your finished code should...

  • Write a C program to compute and print Fibonacci values for some integers. You can assume...

    Write a C program to compute and print Fibonacci values for some integers. You can assume that all input numbers are positive integers. The Fibonacci numbers are defined as follows: The first two Fibonacci numbers are 1 and 1. Any Fibonacci number after the first two numbers is the sum of its two predecessors. The Fibonacci numbers can be listed as the following sequence:         1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... It is clear...

  • For this c++ assignment, Overview write a program that will process two sets of numeric information....

    For this c++ assignment, Overview write a program that will process two sets of numeric information. The information will be needed for later processing, so it will be stored in two arrays that will be displayed, sorted, and displayed (again). One set of numeric information will be read from a file while the other will be randomly generated. The arrays that will be used in the assignment should be declared to hold a maximum of 50 double or float elements....

  • please code in basic c++ program Write a program that uses the following formula: n (ax...

    please code in basic c++ program Write a program that uses the following formula: n (ax - ib) i=1 Your program will prompt the user for the number of iterations for the calculation. input values for n, x, a, b, and c. n must be a positive integer, but x, a, b, and c can be any real numbers. Then it will perform the calculation and output the result. Then, it will ask the user if they would like to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT