Created
August 29, 2023 11:53
-
-
Save codeperfectplus/89342ed07243c08ce469bdfce8ff81e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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