URI Online Judge Solution 1014 Consumption – URI 1014 Solution in C, C++, Java, Python and C#
URI Online Judge Solution 1014 Consumption | Beginner
URI Problem Link – 1014 Consumption https://www.urionlinejudge.com.br/judge/en/problems/view/1014
Problem Name: 1014 Consumption solution
Problem Number : URI – 1014 Consumption code
Online Judge : URI Online Judge Solution
Category: Beginner
Solution Language : C,C plus plus, java, python, c#(c sharp)
URI Solution 1014 Consumption Code in C/ URI 1014 solution in C:
#include <stdio.h>
int main()
{
double a, b;
scanf("%lf %lf", &a, &b);
printf("%.3lf km/ln", a / b);
return 0;
}
URI Solution 1014 Consumption Code / URI 1014 Consumption solution in CPP:
#include <cstdio>
int main()
{
double a;
double b;
scanf("%lf", &a);
scanf("%lf", &b);
printf("%.3lf km/ln", a / b);
return 0;
}
URI Solution 1014 Consumption Code / URI 1014 Consumption solution in Java:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
double a, b;
Scanner sc = new Scanner(System.in);
a = sc.nextDouble();
b = sc.nextDouble();
System.out.printf("%.3f km/ln", a / b);
}
}
URI Solution 1014 Consumption Code / URI 1014 Consumption solution in Python:
distancia = int(input())
combustivel = float(input())
consumo = distancia / combustivel
print("%0.3f km/l" %consumo)
URI Solution 1014 Consumption Code / URI 1014 Consumption solution in C# (C Sharp):
Demonstration:
It’s more than simple, no need to demonstration. Just look the printf
km/ln", a / b
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 Consumption code in C, URI 1014 Consumption code in C++, URI Consumption solution in C, URI solution, URI 1014 Consumption solution in C,URI 1014 Consumption solution in C++-CPP,URI 1014 Consumption solution in C# (C sharp),URI 1014 Consumption solution in Java,URI 1014 Consumption solution in Python,