Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void assign_remainder(int& first, int& second) {
- if (first > second) {
- first %= second;
- }
- else {
- second %= first;
- }
- }
- void assign_remainder(int* first, int* second) {
- if (*first > *second) {
- *first = *first % *second;
- }
- else {
- *second = *second % *first;
- }
- }
- void round_1(float& ch) {
- if (int(ch * 10) % 10 >= 5) {
- ch = int(ch) + 1;
- }
- else {
- ch = int(ch);
- }
- }
- void round_1(float* ch) {
- if (int(*ch * 10) % 10 >= 5) {
- *ch = int(*ch) + 1;
- }
- else {
- *ch = int(*ch);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement