URI Online Judge Solution 1009 Salary with Bonus - URI 1009 Solution in C, C++, Java, Python and C# - Online Judge Solution

Latest

It is a free Online judges problems solution list. Here you can find UVA online Judge Solution, URI Online Judge Solution, Code Marshal Online Judge Solution, Spoz Online Judge Problems Solution

Wednesday, June 7, 2017

URI Online Judge Solution 1009 Salary with Bonus - URI 1009 Solution in C, C++, Java, Python and C#

URI Online Judge Solution 1009 Salary with Bonus - URI 1009 Solution in C, C++, Java, Python and C#

URI Online Judge Solution 1009 Salary with Bonus | Beginner
URI Problem Link - https://www.urionlinejudge.com.br/judge/en/problems/view/1009

Problem Name: 1009 Salary with Bonus Code
Problem Number : URI - 1009 Salary with Bonus Solution
Online Judge : URI Online Judge Solution
Category: Beginner
Solution Language : C,C plus plus, java, python, c#(c sharp)





URI Solution 1009 Salary with Bonus Code in C:

#include<stdio.h>
int main()
{
  double salary,value,
  TOTAL;
  char name;
  scanf("%s %lf %lf",&name,&salary,&value);

  TOTAL = salary+value*.15;
  printf("TOTAL = R$ %.2lf\n",TOTAL);
  return 0; 
}


URI Solution 1009 Salary with Bonus Code / URI 1009 Salary with Bonus solution in CPP:

#include <cstdio>

int main()
{
 double a;
 double b;
 char word[256];

 scanf("%s", &word);
 scanf("%lf", &a);
 scanf("%lf", &b);

 printf("TOTAL = R$ %.2lf\n", a + ((b/100)*15));

 return 0;
}


URI Solution 1009 Code in Java/ URI 1009 solution in Java:

import java.util.Scanner;

public class Main {
 
 public static void main(String[] args) {
  
   double salary = 0,value, TOTAL;
   String name;
   Scanner sc = new Scanner(System.in);
   name = sc.next();
   salary = sc.nextDouble();
   value = sc.nextDouble();
   

   TOTAL = salary + value * 0.15;
   System.out.printf("TOTAL = R$ %.2f\n",TOTAL);
    
 }
}

URI Solution 1009 Code / URI 1009 solution in  Python:

nome = input()
salfixo = float(input())
qtdevendas = float(input())

bonus = float(qtdevendas * (15/100))

total = salfixo + bonus

print("TOTAL = R$ %0.2f" %total)


URI Solution 1009 Code / URI 1009 solution in  C# (C Sharp):


Demonstration:

seller receives 15% over all products sold is in the problem and so multiply the result like this .15


TOTAL = salary + value * 0.15;

Just implement this in coding. Since having any problem just put a comment below. Thanks



Tags: URI Online Judge Solution, URI OJ Solution list, URI Problems Solution, URI solver, URI all problem solution list, URI Salary with Bonus code in C, URI 1009 code in C++, URI Salary with Bonus solution in C, URI solution, URI 1009 solution in C,URI 1009 solution in C++-CPP,URI 1009 solution in C# (C sharp),URI 1009 solution in Java,URI 1009 solution in Python,

1 comment:

  1. In C#

    static void Main(string[] args)
    {
    double A, B, Total;
    string N = Convert.ToString(Console.ReadLine());
    A = Convert.ToDouble(Console.ReadLine());
    B = Convert.ToDouble(Console.ReadLine());
    Total = A + B *0.15;

    Console.WriteLine("TOTAL = R$ " + Total.ToString("0.00"));
    Console.ReadLine();
    }

    ReplyDelete