OOP HomeWork

This commit is contained in:
e2hang
2025-08-11 00:01:30 +08:00
commit e8a5ca2363
119 changed files with 3187 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
#pragma once
#ifndef testchar
#define testchar
bool is_digit(char ch);
#endif // !testchar

View File

@@ -0,0 +1,13 @@
#include <iostream>
#include "check_num.h"
using namespace std;
int main()
{
char ch;
for (int i = 0;i < 10;i++) {
cin >> ch;
cout << is_digit(ch)<<endl;
}
return 0;
}

View File

@@ -0,0 +1,3 @@
bool is_digit(char ch) {
return ch >= '0' && ch <= '9';
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB