Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
0)
Read three values (variables A, B and C), which are the three student's
grades. Then, calculate the average, considering that grade A has weight
2, grade B has weight 3 and the grade C has weight 5. Consider that each
grade can go from 0 to 10.0, always with one decimal place.
Input
The input file contains 3 values of floating points with one digit after the
decimal point.
Output
Print MEDIA (average in Portuguese) according to the following example,
with a blank space before and after the equal signal.
11. Write a C program to input week number and print week day.
12. Write a C program to input month number and print number of days in
that month.
15. Write a C program to input all sides of a triangle and check whether
triangle is valid or not.
21. Write a C program to input electricity unit charges and calculate total
electricity bill according to the given condition:
Task
Input Format
Output Format
(e.g., one for , two for , etc.); otherwise, print Greater than 9 instead.
Sample Input
5
Sample Output
five
Sample Input #01
8
Sample Output #01
eight
Sample Input #02
44
Sample Output #02
Greater than 9
Task 1
Read an integer number that is the code number for phone dialing. Then,
print the destination according to the following table:
If the input number isn’t found in the above table, the output must be:
DDD nao cadastrado
That means “DDD not found” in Portuguese language.
Input
The input consists in a unique integer number.
Output
Print the city name corresponding to the input DDD. Print DDD nao
cadastrado if doesn't exist corresponding DDD to the typed number.
11 Sao Paulo
Task 2
You must make a program that read a float-point number and print a
message saying in which of following intervals the number belongs: [0,25]
(25,50], (50,75], (75,100]. If the read number is less than zero or greather
than 100, the program must print the message “Fora de intervalo” that means
"Out of Interval".
The symbol '(' represents greather than. For example:
[0,25] indicates numbers between 0 and 25.0000, including both.
(25,50] indicates numbers greather than 25 (25.00001) up to 50.0000000.
Input
The input file contains a floating-point number.
Output
The output must be a message like following example.