Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Exercise1
- {
- public static int test(int num1, int num2)
- {
- int check = -1;
- int sum = num1 + num2;
- if(sum < 100) // comparing if sum is less than 100
- {
- check = 0;
- }
- else if( sum == 100)
- {
- check = 2;
- }
- else
- {
- check = 1;
- }
- return check;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement