Monday, June 22, 2020

URI 1010 Solution- Brain Muscles URI 1010 Solution In C

Posted By: Naeem - June 22, 2020

URI Online Judge Solution 1010 - Brain Muscles URI 1010
URI Online Judge Solution 1010☺ Simple Calculate☺ URI Online Judge Solution 1010
Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.

URI Online Judge Solution 1010 - Brain Muscles URI 1010 Solution In C
Add caption

URI Online Judge | 1010
Simple Calculate

 

In this problem, the task is to read a code of a product 1, the number of units of product 1, the price for one unit of product 1, the code of a product 2, the number of units of product 2 and the price for one unit of product 2. After this, calculate and show the amount to be paid.

Input

The input file contains two lines of data. In each line there will be 3 values: two integers and a floating value with 2 digits after the decimal point.

Output

The output file must be a message like the following example where "Valor a pagar" means Value to Pay. Remember the space after ":" and after "R$" symbol. The value must be presented with 2 digits after the point.

Samples Input
Samples Output
12 1 5.30
16 2 5.10
VALOR A PAGAR: R$ 15.50
13 2 15.30
161 4 5.20
VALOR A PAGAR: R$ 51.40

1 1 15.10

2 1 15.10


VALOR A PAGAR: R$ 30.20




URI Solution 1010 Simple Calculate Solution in C:





#include<stdio.h>
int main()
{
   int P1,P2,U1,U2;
    double PP1,PP2,TOTAL;
    scanf("%d %d %lf",&P1,&U1,&PP1);
    scanf("%d %d %lf",&P2,&U2,&PP2);
    TOTAL=(U1*PP1)+(U2*PP2);
    printf("VALOR A PAGAR: R$ %.2lf\n",TOTAL);
  return 0;
}     
                  

URI Online Judge Solution 1009 - Brain Muscles URI 1009

Posted By: Naeem - June 22, 2020

URI Online Judge Solution 1009 - Brain Muscles URI 1009
URI Online Judge Solution 1009☺ Salary with Bonus ☺ URI Online Judge Solution 1009
Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.


Add caption



URI Online Judge | 1009
Salary with Bonus

 

Make a program that reads a seller's name, his/her fixed salary and the sale's total made by himself/herself in the month (in money). Considering that this seller receives 15% over all products sold, write the final salary (total) of this seller at the end of the month , with two decimal places.
- Don’t forget to print the line's end after the result, otherwise you will receive “Presentation Error”.
- Don’t forget the blank spaces.

Input

The input file contains a text (employee's first name), and two double precision values, that are the seller's salary and the total value sold by him/her.

Output

Print the seller's total salary, according to the given example.

Samples Input
Samples Output
JOAO
500.00
1230.30
TOTAL = R$ 684.54
PEDRO
700.00
0.00

TOTAL = R$ 700.00
MANGOJATA
1700.00
1230.50
TOTAL = R$ 1884.58

URI Solution 1009  Salary with Bonus Solution in C:



#include<stdio.h>
int main()
{
  char name;
   double salary,value, TOTAL;
   scanf("%s %lf %lf",&name,&salary,&value);
   TOTAL = salary+value*.15;
   printf("TOTAL = R$ %.2lf\n",TOTAL);
  return 0;
}                       

URI Online Judge Solution 1008 - Brain Muscles URI 100

Posted By: Naeem - June 22, 2020

 URI Online Judge Solution 1008 - Brain Muscles URI 1008
URI Online Judge Solution 1008☺ Salary☺ URI Online Judge Solution 1008
Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.


Add caption

URI Online Judge | 1008

Salary

 

Write a program that reads an employee's number, his/her worked hours number in a month and the amount he received per hour. Print the employee's number and salary that he/she will receive at end of the month, with two decimal places.
  • Don’t forget to print the line's end after the result, otherwise you will receive “Presentation Error”.
  • Don’t forget the space before and after the equal signal and after the U$.

Input

The input file contains 2 integer numbers and 1 value of floating point, representing the number, worked hours amount and the amount the employee receives per worked hour.

Output

Print the number and the employee's salary, according to the given example, with a blank space before and after the equal signal.

Samples Input
Samples Output
25
100
5.50
NUMBER = 25
SALARY = U$ 550.00
1
200
20.50
NUMBER = 1
SALARY = U$ 4100.00
6
145
15.55
NUMBER = 6
SALARY = U$ 2254.75


URI Solution 1008 Salary Solution in C:




#include<stdio.h>
int main()
{
        int NUMBER;
        scanf("%d",&NUMBER);
        printf("NUMBER = %d\n",NUMBER);
        int AMOUNT;
        float HOUR;
        float SALARY;
        scanf("%d",&AMOUNT);
        scanf("%f",&HOUR);
        SALARY = (float)(HOUR*AMOUNT);
        printf("SALARY = U$ %.2f\n",SALARY);
        return 0;
}                       

URI Online Judge Solution 1007 - Brain Muscles URI 1007 Solution

Posted By: Naeem - June 22, 2020

URI Online Judge Solution 1007 - Brain Muscles URI 1007
URI Online Judge Solution 1007☺ Difference☺ URI Online Judge Solution 1007
Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.

Add caption
URI Online Judge | 1007

Difference


Read four integer values named A, B, C and D. Calculate and print the difference of product A and B by the product of C and D (A * B - C * D).

Input

The input file contains 4 integer values.

Output

Print DIFERENCA (DIFFERENCE in Portuguese) with all the capital letters, according to the following example, with a blank space before and after the equal signal.

Samples Input
Samples Output

5
6
7
8
DIFERENCA = -26

0
0
7
8
DIFERENCA = -56

5
6
-7
8
DIFERENCA = 86


URI Solution 1007  Difference Solution in C:



#include<stdio.h>
int main()
{
         int A,B,C,D,X;
         scanf("%d %d %d %d",&A,&B,&C,&D);
         X=(A*B)-(C*D);
         printf("DIFERENCA = %d\n",X);
         return 0;
}                         





URI Online Judge Solution 1006 - Brain Muscles URI 1006 Solution In C

Posted By: Naeem - June 22, 2020


URI Online Judge Solution 1006 - Brain Muscles URI 1006
URI Online Judge Solution 1006☺ Average 2☺ URI Online Judge Solution 1006
Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.

URI Online Judge Solution 1006 - Brain Muscles URI 1006 Solution In C
Add caption






URI Online Judge | 1006

Average 2


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 the message "MEDIA"(average in Portuguese) and the student's average according to the following example, with a blank space before and after the equal signal.

Samples Input
Samples Output
5.0
6.0
7.0
MEDIA = 6.3
5.0
10.0
10.0
MEDIA = 9.0
10.0
10.0
5.0
MEDIA = 7.5

URI Solution 1006 Average 2 Solution in C:



#include <stdio.h>
 int main()
{
      double A,B,C,avg;
      scanf("%lf %lf %lf",&A,&B,&C);
      avg=((A)*(2)+(B)*(3)+(C)*(5))/(2+3+5);
      printf("MEDIA = %.1lf\n",avg);  return 0;
}


URI 1010 Solution- Brain Muscles URI 1010 Solution In C

URI Online Judge Solution 1010 - Brain Muscles URI 1010 URI Online Judge Solution 1010☺ Simple Calculate☺ URI Online Judge Solution 101...

Copyright © Brain Muscles™ is a registered trademark.

Designed by Templateism. Hosted on Blogger Platform.