These are all the exercises written in C mostly from collage feel free to browse.
Assignment 1
-
(tema1(ex1))Calculate and display the roots of the second degree equation (the coefficients a, b and c are real numbers and are read from the keyboard).
-
(tema1(ex2))The value of a real number x is read from the keyboard. Write a program that calls up some math functions through the following repetitive menu:
1 - ex
2 - In x
3 - | x |
4 - 10x
0 - Exit
-
(tema1(ex3))The grades for n students are entered from the keyboard. Show how many students passed the exam.
-
(tema1(ex4))Read a natural number n. Calculate the sum of the digits of which n is composed. The last digit of a number is the remainder of the division of that number to 10. What remains of the number is how much it is divided into 10.
Assignment 2
-
(tema2(ex1))Calculate and display the average average of a student whose notes are read from the keyboard and retained in a one-dimensional artwork. You must restrict the inserted marks to greater than or equal to 5.
-
(tema2(ex2))It reads from the keyboard the elements of a matrix. Show the matrix and count how many of its elements are larger than their arithmetic mean.
-
(tema2(ex3))10 words are read from the keyboard. Show a warning for those who are bigger (lexicographical) than the first word.
-
(tema2(ex4))Define a structure that describes a calendar date through three fields (year, month, day). Write a function that compares two calendar data received as an argument. The function will return 0 if the data is equal and 1 otherwise.