Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
19.05.2020
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class student { public string surname; public string name; public int age; public int otsenka; public void printstudent() { Console.WriteLine("Фамилия: {0} Имя: {1}", surname, name); } public void soglasn() { string sogl; sogl = "йЙцЦкКнНгГшШщЩзЗхХфФвВпПрРоОлЛдДжЖчЧсСмМтТбБqQwWrRtTyYpPsSdDfFgGhHjJkKlLzZxXcCvVbBnNmM"; for (int i = 0; i < surname.Length; ++i) { for (int q = 0; q < sogl.Length; ++q) { if(surname[i] == sogl[q]) { Console.Write(surname[i]); } } } } public string predmet; public void printinform() { string predmet2; predmet2 = "информатика"; int result; result = String.Compare(predmet, predmet2, true); if(result == 0) { Console.WriteLine("Информатика"); printstudent(); Console.WriteLine("Оценка: " + otsenka); } } } public class Program { public static void Main(string[] args) { student[] k107; int n = Convert.ToInt32(Console.ReadLine()); k107 = new student[n]; for (int i=0; i<n; i++) { k107[i] = new student(); k107[i].surname = Console.ReadLine(); k107[i].name = Console.ReadLine(); k107[i].age = Convert.ToInt32(Console.ReadLine()); k107[i].predmet = Console.ReadLine(); k107[i].otsenka = Convert.ToInt32(Console.ReadLine()); } for (int i=0; i<n; i++) { k107[i].printinform(); Console.WriteLine(); } } } }
run
|
edit
|
history
|
help
0
CommandForce
Compare 2 int
MVC Learning
octalofint
Finding a Substring in a Main String
SHA Tester 2.0
a
Math v9.1
hhhh
D18