MCPcopy Create free account
hub / github.com/SAKET-SK/Programming-Aptitude-Interview-Prep / main

Method main

TCS/Que 1/Solution.java:4–14  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

2public class Solution
3{
4 public static void main(String[] args)
5 {
6 Scanner sc=new Scanner(System.in);
7 int v=sc.nextInt();
8 int w=sc.nextInt();
9 float res=((4*v)-w)/2;
10 if(w>=2 && (w%2==0) && v<w )
11 System.out.println("TW= "+(int)(res)+" FW= "+(int)(v-res));
12 else
13 System.out.println("INVALID INPUT");
14 }
15}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected