|
|
|
|
|
|
|
|
|
|
|
|
|
3206, 2/161 |
|
1999dylee | |||||||
C++ÇÔ¼ö°ü·Ã Áú¹®ÀÌ¿¡¿ë!! | |||||||
http://www.hackerschool.org/HS_Boards/zboard.php?id=QNA_programming&no=6627 [º¹»ç]
Hit : 1842 Date : 2021/05/11 02:41
|
|||||||
electronicgy | #include<iostream> using namespace std; void func(int,int*); int main() { int nNum = 0, a[4] = { 0, }; cout << "³× ÀÚ¸®¼ö ÀÔ·ÂÇϽÿÀ : "; cin >> nNum; func(nNum, a); cout << "õÀÇ ÀÚ¸®¼ö : " << a[3] << endl; cout << "¹éÀÇ ÀÚ¸®¼ö : " << a[2] << endl; cout << "½ÊÀÇ ÀÚ¸®¼ö : " << a[1] << endl; cout << "ÀÏÀÇ ÀÚ¸®¼ö : " << a[0] << endl; return 0; } void func(int nNum, int* arr) { arr[0] = (nNum % 10); arr[1] = ((nNum - arr[0]) % 100) / 10; arr[2] = (nNum % 1000) / 100; arr[3] = (nNum / 1000); } |
2021/05/12 | |
electronicgy | #include<iostream> using namespace std; int main() { int nNum = 0; cout << "Á¡¼ö¸¦ ÀÔ·ÂÇϼ¼¿ä : "; cin >> nNum; switch (nNum/10) { case 10: case 9: cout << "AÇÐÁ¡" << endl; break; case 8: cout << "BÇÐÁ¡" << endl; break; case 7: cout << "CÇÐÁ¡" << endl; break; default: cout << "FÇÐÁ¡" << endl; break; } return 0; } |
2021/05/12 | |
somass | #include<iostream> using namespace std; int main() { int nNum = 0; cout << "Á¡¼ö¸¦ ÀÔ·ÂÇϼ¼¿ä : "; cin >> nNum; switch (nNum/10) { case 10: case 9: cout << "AÇÐÁ¡" << endl; break; case 8: cout << "BÇÐÁ¡" << endl; break; case 7: cout << "CÇÐÁ¡" << endl; break; default: cout << "FÇÐÁ¡" << endl; break; } return 0; } - |
2022/09/16 | |
|
|