Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save codeperfectplus/89342ed07243c08ce469bdfce8ff81e7 to your computer and use it in GitHub Desktop.

Select an option

Save codeperfectplus/89342ed07243c08ce469bdfce8ff81e7 to your computer and use it in GitHub Desktop.
// Declare second integer, double, and String variables.
// Read and save an integer, double, and String to your variables.
var i2 = +(readLine());
var d2 = +(readLine());
var s2 = readLine();
// Print the sum of both integer variables on a new line.
console.log(i + i2);
// Print the sum of the double variables on a new line.
console.log((d + d2).toFixed(1));
// Concatenate and print the String variables on a new line
// The 's' variable above should be printed first.
console.log(s + s2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment