URI Online Judge Solution 1005 Average 1 – Solution in C, C++, Java, Python and C#
URI Online Judge Solution 1005 | Beginner
URI Problem Link – https://www.urionlinejudge.com.br/judge/en/problems/view/1005
Problem Name: URI 1005 Average 1 code
Problem Number : URI – 1005 Average 1 Solution
Online Judge : URI Online Judge Solution
Category: Beginner
Solution Language : C,C plus plus, java, python, c#(c sharp)
Problem’s Screenshot:
See a 4 minutes video – URI online judge solution 1005 in C programming :
URI Solution 1005 Code in C / URI 1005 solution in C:
#include <stdio.h>
int main(){
float x,y;
scanf("%f %f", &x, &y);
printf("MEDIA = %.5fn", (x*3.5+y*7.5)/(3.5+7.5));
return 0;
}
URI Solution 1005 Code / URI 1005 solution in CPP:
#include <cstdio>
int main()
{
double a,b,m;
scanf("%lf %lf", &a, &b);
m = (a/11 * 3.5) + (b/11 * 7.5);
printf("MEDIA = %.5lfn", m);
return 0;
}
URI Solution 1005 Code / URI 1005 solution in Java:
import java.util.Scanner;
public class URI_1005 {
public static void main(String[] args){
float a, b, m;
Scanner sc = new Scanner(System.in);
a = sc.nextFloat();
b = sc.nextFloat();
m = (float) ((a/11 * 3.5) + (b/11 * 7.5));
System.out.printf("MEDIA = %.5fn", m);
}
}
URI Solution 1005 Code / URI 1005 solution in Python:
nota1 = float(input())
nota2 = float(input())
media = (((nota1 * 3.5) + (nota2 * 7.5)) / 11)
print("MEDIA = %0.5f" %media)
URI Solution 1005 Code / URI 1005 solution in C# (C Sharp):
using System;
class URI {
static void Main(string[] args) {
double a, b;
a = Convert.ToDouble(Console.ReadLine());
b=Convert.ToDouble(Console.ReadLine());
Console.WriteLine("MEDIA = " + ((a*3.5 + b*7.5)/(3.5+7.5)).ToString("0.00000"));
Console.ReadKey();
}
}
Demonstration:
This is a simple problem.
Steps to solve URI 1005 Average solution in C:
First take the value of a and b –
scanf("%f %f", &x, &y);
Second Get the median and print –
printf("MEDIA = %.5fn", (x*3.5 + y*7.5) / (3.5 + 7.5));
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 average 1 code in C, URI 1005 code in C++, URI Average 1 solution in C, URI solution, URI 1005 solution in C,URI 1005 solution in C++-CPP,URI 1005 solution in C# (C sharp),URI 1005 solution in Java,URI 1005 solution in Python,