• + 1 comment

    C# Day 2 Challenge

    Its my first time here. Can someone advise why the complie woriks but addional test case fails when i submit this C# Day 2 challenge? Link: [https://www.hackerrank.com/challenges/30-data-types/problem?isFullScreen=true]

    using System;
    using System.Collections.Generic;
    using System.IO;
    
    class Solution {
        static void Main(String[] args) {
            int i = 4;
            double d = 4.0;
            string s = "HackerRank ";
    
            
            // Declare second integer, double, and String variables.
            
            // Read and save an integer, double, and String to your variables.
            
            // Print the sum of both integer variables on a new line.
            
            // Print the sum of the double variables on a new line.
            
            // Concatenate and print the String variables on a new line
            // The 's' variable above should be printed first.
            int i2 = 12;
            double d2 = 4.0;
            string s2 = "is the best place to learn and practice coding!";
            Console.WriteLine(i+i2);
            Console.WriteLine   (String.Format("{0:0.0}",d+d2));
            Console.WriteLine(String.Concat(s + s2));
    
    
        }
    }