C# newbie help...

Soldato
Joined
12 Mar 2008
Posts
23,473
Location
West sussex
Hey

i've got a unit on programming at college. and i need some help with the things i got to do.. i have missed 2 classes because of the injured knee (now im ok and back to college) so i dont know any of it.. what im asking is not to do it for me just point me to the right direction (tutorials or guides) on how to do something similar here's the first question (i know it sounds easy and it probably is if i haven't missed them classes) but for me it's hard..

the questions
Code:
no.1
Write a program to input a temperature in degrees Fahrenheit and display the equivalent temperature in degrees Centigrade. For formula for conversion is: Centigrade = (Fahrenheit - 32)*(5/9).





No.2
Write a program, which divides the value 47 by the value 12 and displays the result with an appropriate message.





no.3
Write a program that will convert a length measured in cm's to its equivalent number of inches.nb 2.57cm = 1inch





no.4
Write a program that reads in a set of data containing an invoice number, quantity of an item and the unit price of the item. The total price should then be calculated, and the output should then appear as follows:

	INVOICE		QUANTITY		UNIT PRICE		TOTAL
	xxx			xxxx			xxxx.xx		xxxxx.xx





no.5

Assuming that the population of a city is 650,000 and that its rate of growth is 4.5% a year, write a program to calculate the population each year over the next five years.






No.6

Write a program to calculate the number of gallons of paint required to paint a rectangular room. The windows and doors are to be ignored in the calculation. The width and length of the room and the height of the walls will be entered in meters. a gallon of paint is assumed to cover about 250 square meters.


thanks for any help :) i just need to understand it.. dont want anyone to do it for me.. as i have to learn it anyways.. :)
 
What have you got so far?

Googling 'C# tutorial' provides thousands of results so I'm sure you can get the basics from some of these.
To be honest, most of these questions are a few lines of code at most, so there's very little we can do short of just giving you the answers, which as you've said yourself is a good way not to learn anything!

My advice would be to read a tutorial or two and come back when you have something more specific to ask.
 
If you're a proper proper programming beginner: try googling "C# hello world" (a "hello world" is basically the most basic program - no inputs, just say hello), and go from there up to command line input and basic math operators :)
 
The easiest way to do these tasks is to write six different console applications (text-based).

Visual Studio will create an empty template for your. By using Console.WriteLine and Console.ReadLine in the correct combinations, you should get to what you need.
 
thanks.

i went on the "blackboard" college resource board.. i've found some powerpoint slides with explanation how to do similar things :) ill give it a go..
 
Back
Top Bottom