Advertisement
ioana_martin98

Untitled

Apr 9th, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1.  public override string ToString()
  2.         {
  3.             string rezultat = "";
  4.             rezultat += "Studentul " + nume + " are varsta " + varsta + " ,media " + media;
  5.             if (note != null)
  6.             {
  7.                 rezultat += " si urmatoarele note: ";
  8.                 for (int i = 0; i < note.Length; i++)
  9.                 {
  10.                     rezultat += note[i] + " ";
  11.                 }
  12.             }
  13.             else
  14.             {
  15.                 rezultat += " si nu are note.";
  16.             }
  17.             return rezultat;
  18.  
  19.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement