Quotes help make search much faster. Example: "Practice Makes Perfect"

Monday, September 2, 2019

Codecademy Creating Variables with Types Exercise 3/6


// Sample Solution
using System;

namespace Form
{
  class Program
  {
    static void Main(string[] args)
    {
      // Create Variables
string name = "Shadow";
      string breed = "Golden Retriever";
      int age = 5;
      double weight = 65.22;
      bool spayed = true;

      // Print variables to the console
/*Console.WriteLine($"Name: {name}");
Console.WriteLine($"Breed: {breed}");
      Console.WriteLine($"Age: {age}");
Console.WriteLine($"Weight: {weight}");
      Console.WriteLine($"Has been spayed: {spayed}");*/
      Console.WriteLine(name);
Console.WriteLine(breed);
      Console.WriteLine(age);
Console.WriteLine(weight);
      Console.WriteLine(spayed);
    }
  }
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts