Advertisement
yanabg

Untitled

Dec 18th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4.  
  5. namespace TestDelete
  6. {
  7. class Solution
  8. {
  9. static void Main(String[] args)
  10. {
  11. int i = 4;
  12. double d = 4.0;
  13. string s = "HackerRank ";
  14. // Declare second integer, double, and String variables.
  15. int myI = 12;
  16. double myD = 4.0;
  17. string myS = "is the best place to learn and practice coding!";
  18.  
  19. // Read and save an integer, double, and String to your variables.
  20.  
  21. int input1 = i + myI;
  22. double input2 = d + myD;
  23. // input3 = Convert.ToDouble(d);
  24. string myString = s + myS;
  25.  
  26. // Print the sum of both integer variables on a new line.
  27. Console.WriteLine(input1);
  28. // Print the sum of the double variables on a new line.
  29. Console.WriteLine(input2);
  30. // Concatenate and print the String variables on a new line
  31. Console.WriteLine(myString);
  32. // The 's' variable above should be printed first.
  33.  
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement