목록분류 전체보기 (170)
091
🔍C#: CS_601.입력받은 값은 해당 차의 연도와 사용연수이며, 이 차의 값을 출력하시오. 1. 문제 정답using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.IO;using System.Runtime.CompilerServices;namespace CS_601{ class CS_601 { static void Main(string[] args) { try { string[] input = Console.ReadLine().Split..

🔍C#: CS_510.주어진 문자열을 입력받은 숫자에 따라 write.txt에 입력하시오. 이때 null이 들어오거나 길이보다 큰 수가 들어온 경우에는 전부 다 작성하시오. 1. 문제 정답using System;using System.IO;using System.Linq;using System.Collections.Generic;namespace CS_510{ class CS_510{ static string title = "The Little Prince"; static string content = "To me, you are still nothing more than a little boy who is just like a hundred thousand other l..

🔍C#: CS_509.주어진 read.txt를 정렬하여 주어진 숫자만큼 출력하시오. 1. 문제 정답using System;using System.IO;using System.Linq;using System.Collections.Generic;namespace CS_509{ class CS_509{ static string filePath = "read.txt"; static void Main(string[] args){ try{ int input = int.Parse(Console.ReadLine() ?? " "); if(input list = new List(); usi..

🔍C#: CS_508.주어진 read.txt에서 각 학생의 성별로 나누어 평균을 출력하시오. 1. 문제 정답using System;using System.IO;using System.Linq;using System.Security.Cryptography;namespace CS_508{ class CS_508{ static string filePath = "read.txt"; static void Main(string[] args){ try{ int input = int.Parse(Console.ReadLine() ?? ""); if(input > 10 || input 2. 정리- 각 학생 별 평균을..

🔍C#: CS_507.주어진 read.txt에서 주어진 문자열에 입력한 단어가 얼마나 들어있는지 찾으시오. 1. 문제 정답using System;using System.IO;using System.Linq;using System.Security.Cryptography;namespace CS_507{ class CS_507{ static string RfilePath = "read.txt"; //static string WfilePath = "write.txt"; static void Main(string[] args){ try{ string input = Console.ReadLine() ?? ""; ..

🔍C#: CS_506.주어진 파일 read.txt에 있는 13줄의 데이터 중 입력받은 값의 줄을 제외한 나머지 줄을 write.txt에 입력하시오. 1. 문제 정답using System;using System.IO;namespace CS_506{ class CS_506{ static string RfilePath = "read.txt"; static string WfilePath = "write.txt"; static void Main(string[] args){ try{ int input = int.Parse(Console.ReadLine() ?? ""); if(input > 13 ||..
🔍C#: CS_505.주어진 파일인 read.txt에서 13줄 중에 사용자가 입력한 조건에 부합하는 줄의 이름과 총합 값을 출력하시오. 1. 문제 정답using System;using System.IO;using System.Linq;using System.Collections.Generic;namespace CS_505{ class CS_505{ static string filePath = "read.txt"; static void Main(){ try{ List list = new List(); string[] input = Console.ReadLine().Split(' '); ..
🔍C#: CS_504.입력 받은 점수들을 파일에 저장하고 출력하시오. 만약 점수에 맞지 않는 값이 들어온 경우에는 error를 출력하시오. 1. 문제 정답using System;using System.IO;using System.Linq;namespace CS_503{ class CS_503{ static string filePath = "write.txt"; static string[] new_student = { "Sam", "1981/10/1", "A234567890" }; static void Main(){ try{ int[] scores = Console.ReadLine() ..