100% Guaranteed Results


A100 – Computer Science Solved
$ 20.99
Category:

Description

5/5 – (1 vote)

1. Basics
Write a program that does the following:
a) Declare two integer variables called num1and num2.
b) Use int.Parse(Console.ReadLine()) to assign two values entered by the user to the variables (don’t forget to use Console.WriteLine ask the user to enter these values).
c) Use Console.WriteLine to output the sum of the two variables to the Console
d) Use Console.WriteLine again to output the result of the variables multiplied together to the Console.
e) Add the two variables together and square the result. Output the final result to the Console.
2. Sandra’s slab calculator
Sandra sells paving slabs. Customers come in with plans for their patio and ask how many slabs they will need and how much it will cost. Sandra needs a program to help her work out the costs.

Inputs will be
● the number of slabs across ● the number of slabs deep ● the cost of each slab.
What you need to do:
Write a program to help Sandra with her costs.
Extension: use String.Format(“{0:0.00}”, 123.4567) to make the answer always 2 decimal places.
How to test it:
Run the program and enter in the following data:
● Slabs wide: 4;
● slabs deep: 5 ;
● cost per slab: £2.99

Reviews

There are no reviews yet.

Be the first to review “A100 – Computer Science Solved”

Your email address will not be published. Required fields are marked *

Related products