How to check if one number is multiple of another in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        int num1 = 81;
        int num2 = 9;
 
        Console.Write((num1 % num2 == 0) ? "yes" : "no");
    }
}




/*
run:

yes

*/

 



answered Jun 28, 2022 by avibootz

Related questions

1 answer 136 views
1 answer 112 views
1 answer 305 views
1 answer 111 views
1 answer 118 views
1 answer 95 views
1 answer 115 views
...