#include <stdio.h>
void Swap(int *a, int *b)
{
int temp = *a;
*a = *b;
*b = temp;
}
void main() {
int score = 86;
char grade;
switch(score / 10) {
case 10:
case 9:
grade = 'A';
break;
case 8:
grade = 'B';
break;
case 7:
grade = 'C';
break;
case 6:
grade = 'D';
break;
default:
grade = 'F';
break;
}
printf("당신의 점수는 %d점이고 등급은 %c입니다. \n", score, grade);
short birthday;
short *ptr;
ptr = &birthday;
printf("borthday 변수의 주소는 %p입니다 \n", ptr);
int start = 96, end = 5;
printf("before : start = %d, end = %d\n", start, end);
if(start>end) Swap(&start, &end);
printf("before : start = %d, end = %d\n", start, end);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: