Create a program to generate student attendance record in which teacher mark absent or present of each student and student have capability to see their attendance record of their each subjects.
Note: Your work must be done on console application.
using System;
class HelloWorld {
static void Main() {
Console.WriteLine("#=#=# In this program the teacher can mark the students are present or absent. #=#=#");
// A array of pupils
string[] students = { "Mahesh Chand", "Jeff Prosise", "Dave McCarter", "Allen O'neill", "Tim Bernars", "Isaak Nyuton", "Gal Gadot",
"Monica Rathbun", "Henry He", "Raj Kumar", "Mark Prime", "Erse Bilgec", "Ottofon Bismark", "Tom Holland",
"Rose Tracey", "Mike Crown", "Jeff Bezos", "Mark Serikuli", "Ali Berduri", "Tony Stark" };
char[] marks = {'+', '-'};
// Create a Random object
Random rand = new Random();
Console.WriteLine("Enter the number of students: ");
int n = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < n; i++) {
// Generate a random i less than the size of the array.
int index = rand.Next(students.Length);
int index1 = rand.Next(marks.Length);
Console.WriteLine("{0} | {1} |", students[index], marks[index1]);
}
Console.ReadKey();
}
}
Comments
Leave a comment