URI 1042 – C programming (Solve) : Simple Sort \ Read three integers and sort them in ascending order. After, print these values in ascending order, a blank line and then the values in the sequence as they were readed. Input The input contains three integer numbers. Output Present the output as requested above. Solve […]

You are browsing archives for

# Category: URI Online Judge

The URI Online Judge : The *URI Online Judge* is a project that is being developed by the Computer Science Department of *URI* University. The main goal of the project is to provide programming practice and knowledge sharing.

## URI 1048 – C programming (Solve) : Salar

URI 1048 – C programming (Solve) : Salary Increase : The company ABC decided to give a salary increase to its employees, according to the following table:Read the employee’s salary, calculate and print the new employee’s salary, as well the money earned and the increase percentual obtained by the employee, with corresponding messages in Portuguese, […]

## URI 1046 – C programming (Solve) : Game

URI 1046 – C programming (Solve) : Game Time Read the start time and end time of a game, in hours. Then calculate the duration of the game, knowing that the game can begin in a day and finish in another day, with a maximum duration of 24 hours. The message must be printed in […]

## URI 1045 – C programming (Solve) : Trian

URI 1045 – C programming (Solve) : Triangle Types : Read 3 double numbers (A, B and C) representing the sides of a triangle and arrange them in decreasing order, so that the side A is the biggest of the three sides. Next, determine the type of triangle that they can make, based on the […]

## URI 1044 – C programming (Solve) : Multi

URI 1044 – C programming (Solve) : Multiples Read two nteger values (A and B). After, the program should print the message “Sao Multiplos” (are multiples) or “Nao sao Multiplos” (aren’t multiples), corresponding to the read values. Input The input has two integer numbers. Output Print the relative message to the input as stated above. Solve Code – #include […]

## URI 1043 – C programming (Solve) : Trian

URI 1043 – C programming (Solve) : Triangle Read three point floating values (A, B and C) and verify if is possible to make a triangle with them. If it is possible, calculate the perimeter of the triangle and print the message: Perimetro = XX.X If it is not possible, calculate the area of the […]

## URI 1041 – C programming (Solve) : Coord

URI 1041 – C programming (Solve) : Coordinates of a Point Write an algorithm that reads two floating values (x and y), which should represent the coordinates of a point in a plane. Next, determine which quadrant the point belongs, or if you are over one of the Cartesian axes or the origin (x = […]

## URI 1040 – C programming (Solve) : Avera

URI 1040 – C programming (Solve) : Average 3 Read four numbers (N1, N2, N3, N4), which one with 1 digit after the decimal point, corresponding to 4 scores obtained by a student. Calculate the average with weights 2, 3, 4 e 1 respectively, for these 4 scores and print the message “Media: ” (Average), followed by […]

## URI 1037 – C programming (Solve) : Inter

URI 1037 – C programming (Solve) : Interval – 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 […]

## URI 1038 – C programming (Solve) : Snack

URI 1038 – C programming (Solve) : Snack Using the following table, write a program that reads a code and the amount of an item. After, print the value to pay. This is a very simple program with the only intention of practice of selection commands. Input The input file contains two integer numbers X and Y. X is the […]

## URI 1036 – C programming (Solve) : Bhask

URI 1036 – C programming (Solve) : Bhaskara’s Formula- Read 3 floating-point numbers. After, print the roots of bhaskara’s formula. If it’s impossible to calculate the roots because a division by zero or a square root of a negative number, presents the message “Impossivel calcular”. Input Read 3 floating-point numbers A, B and C. Output Print […]

## URI 1035 – C programming (Solve) : Selec

URI 1035 – C programming (Solve) : Selection Test 1 Read 4 integer values A, B, C and D. Then if B is greater than C and D is greater than A and if the sum of C and D is greater than the sum of A and B and if C and D were […]

## URI 1021 – C programming (Solve) : Bankn

URI 1021 – C programming (Solve) : Banknotes and Coins Read a value of floating point with two decimal places. This represents a monetary value. After this, calculate the smallest possible number of notes and coins on which the value can be decomposed. The considered notes are of 100, 50, 20, 10, 5, 2. The possible coins are of […]

## URI 1052 – C programming (Solve) : Month

URI 1052 – C programming (Solve) : Month – Read an integer number between 1 and 12, including. Corresponding to this number, you must print the month of the year, in english, with the first letter in uppercase. Input The input contains only an integer number. Output Print the name of the month according to […]

## URI 1067 – C programming (Solve) : ODD N

Read an integer value X (1 <= X <= 1000). Then print the odd numbers from 1 to X, each one in a line, including Xif is the case. Input The input will be an integer value. Output Print all odd values between 1 and X, including X if is the case. Solve code – #include<stdio.h> int main() { int i,X; scanf(“%d”,&X); for(i=1;i<=X;i++){ if(i%2!=0){ […]