Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. public Student(string name,int studentId,string[] courses,int[] grades)
  2. {
  3. this.name = name;
  4. this.studentId = studentId;
  5. this.courses = courses;
  6. this.grades = grades;
  7.  
  8. }
  9. public void info()
  10. {
  11. Console.WriteLine("name of the student is" + name);
  12. Console.WriteLine("StudentID of the student is" + studentId);
  13. Console.WriteLine("courses taken by student are" + courses);
  14. Console.WriteLine("grades earned by the student are" + grades);
  15.  
  16. }
  17. public void sleep()
  18. {
  19. Console.WriteLine("enter the amount of time the student slept");
  20. int sleep=Convert.ToInt32(Console.ReadLine());
  21. int a = grades.Length;
  22. int b = 0;
  23. if (b<a)
  24. {
  25. grades[b] = grades[b] - (sleep / 10);
  26. }
  27.  
  28.  
  29.  
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement