Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 2.01 KB

## Console Input/Output

1. Write a program that reads 3 integers from the console and prints their sum.
• Write a program that reads the radius `r` of a circle and prints its perimeter and area.

• A company has name, address, phone number, fax number, web site and manager. The manager has first name, last name, age and a phone number. Write a program that reads the information about a company and its manager and prints them on the console.

• Write a program that reads two positive integers and prints how many numbers `p` exist between them such that the reminder of the division by 5 is 0 (inclusive). Example: p(17,25) = 2.

• Write a program that gets two numbers from the console and prints the greater of them. Don�t use `if` statements.

• Write a program that reads the coefficients `a`, `b` and `c` of a quadratic equation ax2+bx+c=0 and solves it (prints its real roots).

• Write a program that gets a number `n` and after that gets more n numbers and calculates and prints their sum.

• Write a program that reads an integer `n` from the console and prints all the numbers in the interval `[1..n]`, each on a single line.

• Write a program to print the first 100 members of the sequence of Fibonacci: `0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, ...`

• Write a program to calculate the sum (with accuracy of 0.001): `1 + 1/2 - 1/3 + 1/4 - 1/5 + ...`

• *Implement the "Falling Rocks" game in the text console. A small dwarf stays at the bottom of the screen and can move left and right (by the arrows keys). A number of rocks of different sizes and forms constantly fall down and you need to avoid a crash. Rocks are the symbols `'^', '@', '*', '&', '+', '%', '\$', '#', '!', '.', ';', '-'` distributed with appropriate density. The dwarf is `(O)`. Ensure a constant game speed by `Thread.Sleep(150)`. Implement collision detection and scoring system.

You can’t perform that action at this time.