OriginCodeAcademy / Cohort10

Projects, code tests and resources for the 10th cohort of Origin Code Academy
4 stars 2 forks source link

13-CSharpExercises-VisualStudio #95

Open skcali opened 7 years ago

skcali commented 7 years ago
  1. Where can I find your repository? (Paste the url of your repository below) https://github.com/skcali/CSharpExercises

  2. Which data type would you use to store a phone number? I would use an int because a phone number can fit inside of the range possible with an int type.

  3. Surprise! Write a for loop to write out all even numbers between 1 and 100 to the console in both JavaScript and C#.

    for (var i = 0; i < 100; i++) {
    if ( i % 2 === 0 ) {
      console.log(i);
    }
    }
for (int i = 0; i < 100; i++) {
   if ( i % 2 == 0 ) {
      Console.WriteLine(i);
   }
}