You are given three numbers A , B & C . Print the largest amongst these three numbers. Input Description: Three numbers are provided to you. Output Description: Find and print the largest among the three Sample Input : 1 2 3 Sample Output : 3 const readline = require('readline'); const inp = readline.createInterface({ input: process.stdin });const userInput = [];inp.on("line", (data) => { userInput.push(data); }); inp.on("close", () => { var a = parseInt(userInput[0]); var b = parseInt(userInput[1]); var c = parseInt(userInput[2]); var d=Math.max(a,b,c) console.log(d); });
You are given Two Numbers, A and B. If C = A + B. Find C. Note: Round off the output to a single decimal place. Input Description: You are provided with two numbers A and B. Output Description: Find the sum of the two numbers (A + B) Sample Input : 1 1 Sample Output : 2 const readline = require('readline'); const inp = readline.createInterface({ input: process.stdin }); const userInput = []; inp.on("line", (data) => { userInput.push(data); }); inp.on("close", () => {var a = parseInt(userInput[0]); var b = parseInt(userInput[1]); var c=a+b console.log(c.toFixed(1)); });