Notice
														
												
											
												
												
													Recent Posts
													
											
												
												
													Recent Comments
													
											
												
												
													Link
													
											
									| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | 
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | 
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | 
| 30 | 
													Tags
													
											
												
												- 배열 사용X
- 소스코드 하이라이팅
- 두 값 교체하기
- time.h
- round()함수
- 유니티허브
- 2차원 배열
- 문자 분류
- ASCII CODE TABLE
- 두 수 크기 비교 함수
- scanf 오류
- C 언어
- 미리 컴파일된 헤더 사용안함
- Logic Gates
- 유니티
- AWS Discovery Book
- UnityHub
- Unity
- 극장 예약 프로그램
- Axes
- 기호 상수
- 반사 벡터
- 난수 값 맞추기 게임
- 개인 정리
- C언어
- GetAxis()메서드
- 논리 게이트
- 키입력값 받기
- 프로젝트 목록 제거
- 전처리기 정의
													Archives
													
											
												
												- Today
- Total
flrto
학생입력 프로그램 본문
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h> int index = 0; struct Student {     int m_number;     char m_name[10];     double m_grade; }; void InputData(struct Student *); void PrintList(struct Student *); int main(void) {     struct Student s[100];     int order = 0;     while (order != 3)     {         printf("=====================\n1 입력, 2 출력, 3 종료\n=====================\n");         scanf("%d", &order);         switch (order)         {         case 1:             InputData(s);             break;         case 2:             PrintList(s);             break;         case 3:             printf("종료합니다.\n");             break;         }     }     return 0; } void InputData(struct Student *s) {     printf("학번을 입력하세요 ");     scanf("%d", &s[index].m_number);     printf("\n이름을 입력하세요 ");     scanf("%s", &s[index].m_name);     printf("\n학점을 입력하세요 ");     scanf("%lf", &s[index].m_grade);     index++; } void PrintList(struct Student *s) {     for (int i = 0; i < index; i++)     {         printf("\n학번\t이름\t학점 \n");         printf("%d\t%s\t%lf\t\n", s[i].m_number, s[i].m_name, s[i].m_grade);     } } | cs | 
'C > Academy' 카테고리의 다른 글
| 동적 메모리 할당 (0) | 2019.06.28 | 
|---|---|
| 텍스트 게임 (0) | 2019.06.27 | 
| 포인터 (0) | 2019.06.26 | 
| 포인터 증가 연산 예제 (0) | 2019.06.26 | 
| C언어 간단한 로그인 프로그램 (1) | 2019.06.25 | 
			  Comments