Professional Documents
Culture Documents
Assignment 1 Codes
Assignment 1 Codes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Assignment1
class Assignment1
int a = int.Parse(Console.ReadLine());
int b = int.Parse(Console.ReadLine());
int c = int.Parse(Console.ReadLine());
int d = int.Parse(Console.ReadLine());
int e = int.Parse(Console.ReadLine());
int sum = a + b + c + d + e;
Console.ReadKey();
}
Question 2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Circlearea
class Program
int r = 5;
float PI = 3.14f;
float area = PI * r * r;
Console.ReadKey();
}
}
Question 3
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nameandaddress
class Program
Console.WriteLine("Province: Manitoba");
Console.WriteLine("Title of this course : Network Security Diploma");
Console.ReadKey();
Type 2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace name_add
class Program
{
Console.WriteLine("Enter your first name");
Console.WriteLine("first name: " + fname + "\n \n" + "last nanme: " + lname + "\n \n" + "city: "
+ city + "\n \n" + "Province: " + province + "\n \n" + "Course: " + course);
Console.ReadKey();