Test Data: Expected Output
Test Data: Expected Output
Test Data: Expected Output
Write a c# program to computes the future value of an mutual fund investment that has a fixed
rate of return over a period of years.(Hint: Use decimal type anf formuala is [amt=amt +(amt*
rate)] in a loop for n years]
Original investment: $1000
Rate of return: 0.07
Over 10 years
Future value is $1967.151357289565322490000
2. Write a C# program to that takes a number as input and display it four times in a row
(separated by blank spaces), and then four times in the next row, with no separation.
Repeat it two times: Use String Interpolation
Test Data:
Enter a digit: 25
Expected Output:
25 25 25 25
25252525
25 25 25 25
25252525
6. If a scientist knows the wavelength of an electromagnetic wave, he or she can determine what
type of radiation it is. Write a c# program that asks for the wavelength of an electromagnetic
wave in meters and then displays what the wave is according to the data below.
Wavelength between 0.00 and 0.01 -> Radio Wave
Wavelength between 0.01 and 0.001 -> MicroWave
Wavelength between 0.001 and 0.0000007 -> Infrared
Wavelength between 0.0000007 and 0.0000004 -> Visible light
Wavelength between 0.0000004 and 0.00000001 -> Ultraviolet
Wavelength between 0.00000001 and 0.00000000001 -> X-Ray
Wavelength between 0.00000001 and 0.00000000001 -> X-Ray
Wavelength > 0.00000000001 ->Gamma Ray
7. Write a C# program to calculate the total number of days in a given month and year.
Test Data 1:
Enter month:12
Enter Year :2018
Output: December 2018 has 31 days
Test Data 2:
Enter month:2
Enter Year :2016
Output: February 2016 has 29 days