Advertisement
minnera

#30daysofcode #day1 #c#

Sep 27th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. https://www.hackerrank.com/challenges/30-data-types
  2.  
  3.        
  4.         // Declare second integer, double, and String variables.
  5.         int j = int.Parse(Console.ReadLine());
  6.         double e = Double.Parse(Console.ReadLine());
  7.         string w = Console.ReadLine();
  8.         // Read aƄā‚¬[nd save an integer, double, and String to your variables.
  9.         double x = e + d;
  10.         // Print the sum of both integer variables on a new line.
  11.         Console.WriteLine((i+j));
  12.         // Print the sum of the double variables on a new
  13.         Console.WriteLine(String.Format("{0:0.0}", x));
  14.         // Concatenate and print the String variables on a new line
  15.         Console.WriteLine(s+w);
  16.         // The 's' variable above should be printed first.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement