1. a)Write a program that displays the name and address of your college in C#
b)Write a program that prompts the user for his name and average monthly visa bill. The program displays his name and his annual visa bill.
You must match the format exactly:
Name: Justin Bieber
Annual Visa Bill: $12,000.00
Hint: annual bill = monthly bill * 12
c)Write a program that prompts the user for a letter. The
program prints the letter and the number equivalent. The number
equivalent is obtained by casting the char to an int.
YOU MUST READ IN THE INPUT AS A CHAR and you MUST do an explicit
cast
You must match the format exactly:
Char: A
Number Equivalent: 97
[Hint: See Wk03_data_types.pptx slide #6 and #8]
1.
a.
public class
{
public static void main()
{
System.Console.WriteLine("Vasanthi");
System.Console.WriteLine("Visakhapatnam!");
}
}
Output:
Vasanthi
Viskahpatnam
b.
public class
{
public static void main()
{
System.Console.WriteLine("Justin Beiber");
System.Console.WriteLine("Average monthly visa bill = $1000.00");
System.Console.WriteLine("Annual visa bill = $12,000.00");
}
}
output:
Justin Beiber
Average monthly visa bill = $1000.00
Annual visa bill = $12,000.00
Get Answers For Free
Most questions answered within 1 hours.