Monday, June 22, 2020

URI Online Judge Solution 1008 - Brain Muscles URI 100

Posted By: Naeem - June 22, 2020

Share

& Comment


 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;
}                       

About Naeem

Techism is an online Publication that complies Bizarre, Odd, Strange, Out of box facts about the stuff going around in the world which you may find hard to believe and understand. The Main Purpose of this site is to bring reality with a taste of entertainment

0 comments:

Post a Comment

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.