-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProgram.cs
More file actions
33 lines (29 loc) · 971 Bytes
/
Program.cs
File metadata and controls
33 lines (29 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lecture04
{
class Program
{
static void Main(string[] args)
{
EncapClass obj2 = new EncapClass();
Console.Write("\n\nEnter your year : ");
int g = int.Parse(Console.ReadLine());
Console.Write("Enter your name : ");
string n = Console.ReadLine();
obj2.setValue(g,n);
Console.WriteLine("Hello "+ obj2.getName());
Task02Encap obj3 = new Task02Encap();
Console.Write("\nEnter first subject marks : ");
int number1 = int.Parse(Console.ReadLine());
Console.Write("Enter second subject marks : ");
int number2 = int.Parse(Console.ReadLine());
obj3.setNumbers(number1, number2);
obj3.findAvg();
Console.ReadKey();
}
}
}