Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter Students count");
- int students = int.Parse(Console.ReadLine());
- StringBuilder strings = new StringBuilder();
- if (students <= 0)
- {
- Console.WriteLine("Students count is not be empty");
- return;
- }
- for (int i = 1; i < students+1; i++)
- {
- Console.WriteLine($@"Add student {i} mark ");
- int mark = int.Parse(Console.ReadLine());
- strings.AppendLine($@"Student {i} received a mark of {mark}!");
- }
- Console.WriteLine($@"We have {students} students in this class");
- Console.WriteLine(strings);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement