eh, we got some questions for the comp camp, and we have no idea how o solve some of em. we got 6 questions, two hours, and can’t get any to work yet! HELP GUYS!
[FONT=Arial]Problem 1. Friday the 13th[/FONT]
[FONT=Arial]Did you know that if the first day of the month falls on a Sunday, there will surely be a “Friday the 13th”. Now, the problem is simple: given the day of the month, can you tell what day it is?[/FONT]
[FONT=Arial]The first line of the input consists of a single integer, indicating the number of test cases to follow. Each following line describes a test case: a single integer from 1 to 31 indicating the day of the month.[/FONT]
[FONT=Arial]Your program should output the which day of the week (Monday, Tuesday, …) that day falls on. The output format should be “Day d: x”, where d is the day of the month and x is the day of the week. It should also print out “Friday the 13th” if it falls on that day.[/FONT]
[FONT=Arial]Sample input:[/FONT]
4
1
31
27
13
[FONT=Arial]Sample output:[/FONT]
Day 1: Sunday
Day 31: Tuesday
Day 27: Friday
Day 13: Friday the 13th
[FONT=Arial]Problem 2. Reverse Mix[/FONT]
[FONT=Arial]Write a program that takes a set of numbers and prints out the numbers in reverse order, and sum of those numbers. The first line of input indicates the number of lines to follow. Each line contains a single floating-point number. After all numbers have been given, print out the numbers in a single line in reverse order (i.e., x[/FONT][FONT=Arial]n[/FONT][FONT=Arial], x[/FONT][FONT=Arial]n-1[/FONT][FONT=Arial], …, x[/FONT][FONT=Arial]2[/FONT][FONT=Arial], x[/FONT][FONT=Arial]1[/FONT][FONT=Arial]) and the sum of those numbers accurate to 2 decimal places.[/FONT]
[FONT=Arial]Sample input:[/FONT]
3
1.2
3.45
6.789
[FONT=Arial]Sample output:[/FONT]
6.789 3.45 1.2 = 11.44
[FONT=Arial]
[/FONT]
[FONT=Arial]Problem 3. R3@d Th1$[/FONT]
[FONT=Arial]In order to send messages to one another, two geeks Albert and Edison, make a simple cipher out of their messages. The cipher just changes some characters in the message:[/FONT]
[CENTER] [CENTER][CENTER]Character[/CENTER]
[/CENTER]
[CENTER][CENTER]Cipher[/CENTER]
[/CENTER]
[CENTER][CENTER]O *
[/CENTER]
[/CENTER]
[CENTER][CENTER]I 1[/CENTER]
[/CENTER]
[CENTER][CENTER]L 7
[/CENTER]
[/CENTER]
[CENTER][CENTER]A @
[/CENTER]
[/CENTER]
[CENTER][CENTER]S $
[/CENTER]
[/CENTER]
[CENTER][CENTER]E 3
[/CENTER]
[/CENTER]
[CENTER][CENTER]
[/CENTER]
[/CENTER]
[CENTER][CENTER]whitespace _(underscore)
[/CENTER]
[/CENTER]
[CENTER][CENTER]
[/CENTER]
[/CENTER]
[/CENTER]
[FONT=Arial]Input starts with a single integer indicating the number of lines to follow. The lines that follow contains words in uppercase, with each line containing only letters. Input will not contain any blank lines.[/FONT]
[FONT=Arial]Your program should output the cipher in the same number of lines as in the input.[/FONT]
[FONT=Arial]Sample input:[/FONT]
2
CHUCK NORRIS DOES NOT SLEEP
HE WAITS
[FONT=Arial]Sample output:[/FONT]
CHUCK_NRR1$_D3$N*T$733P
H3_W@1T$
[FONT=Arial]Problem 4. Factorial[/FONT]
[FONT=Arial]Write a program that takes a positive integer n (1 <= n <= 25) and print out n!. Your program should keep reading integers until n = 0.[/FONT]
[FONT=Arial]Sample input:[/FONT]
3
8
6
0
[FONT=Arial]Sample output:[/FONT]
3! = 6
8! = 40320
6! = 720
[FONT=Arial]
[/FONT]
[FONT=Arial]Problem 5. Right Triangle[/FONT]
[FONT=Arial]Write a program that will take a single positive integer n (1 <= n <= 9) as input, and print out a right triangle with the adjacent and opposite edges n units long. Draw the triangle using n as the character.[/FONT]
[FONT=Arial]Sample input:[/FONT]
7
[FONT=Arial]Sample output:[/FONT]
7777777
777777
77777
7777
777
77
7
[FONT=Arial]Problem 6. Multiplication Table[/FONT]
[FONT=Arial]Write a program that gets two positive integers n and m (1 <= n, m <= 10) and prints out a multiplication table n units wide and m units high. Each number must be formatted to print a leading zero if it is < 10. Follow the format of the sample output.[/FONT]
[FONT=Arial]Sample input:[/FONT]
3
6
[FONT=Arial]Sample output:[/FONT]
01 02 03
02 04 06
03 06 09
04 08 12
05 10 15
06 12 18
i swear i’ll give a cookie to whoever can help:D THANKS!