Домашната от Console Input Output

Моите, решения на задачите от лекцията за вход и изход от конзолата без последната ( над нея още работя ).
Условията:
1. Write a program that reads 3 integer numbers from the console and prints their sum.
2. Write a program that reads the radius r of a circle and prints its perimeter and area.
3. 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.
4. Write a program that reads two positive integer numbers 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.
5. Write a program that gets two numbers from the console and prints the greater of them. Don’t use if statements.
6. 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).
7. Write a program that gets a number n and after that gets more n numbers and calculates and prints their sum.
8. Write a program that reads an integer number n from the console and prints all the numbers in the interval [1..n], each on a single line.
9. 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, …
10. Write a program to calculate the sum (with accuracy of 0.001): 1 + 1/2 – 1/3 + 1/4 – 1/5 + …

Ето и линк към място за свалянето на решенията ми:


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s