Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Student(string name,int studentId,string[] courses,int[] grades)
- {
- this.name = name;
- this.studentId = studentId;
- this.courses = courses;
- this.grades = grades;
- }
- public void info()
- {
- Console.WriteLine("name of the student is" + name);
- Console.WriteLine("StudentID of the student is" + studentId);
- Console.WriteLine("courses taken by student are" + courses);
- Console.WriteLine("grades earned by the student are" + grades);
- }
- public void sleep()
- {
- Console.WriteLine("enter the amount of time the student slept");
- int sleep=Convert.ToInt32(Console.ReadLine());
- int a = grades.Length;
- int b = 0;
- if (b<a)
- {
- grades[b] = grades[b] - (sleep / 10);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement