Computer Science, asked by shresthabhowmick45, 9 months ago

7.Write a program to check whether an int type number (taken as input) is a multiple of 5 or not.
8.write a program to check whether an int type number (taken as input) is a 2-digit number or not.
9.write a program to check whether an int type number (taken as input) is a 3-digit number divisible by three or not​

Answers

Answered by hoangmustang
1

Answer:

7. You can use % symbol

8. You can convert that number into String and output String length or you can you while loop

ex:

int time = 0;

int a = 567;

while(a>0){

time++;

a/=10;

}

9. Is also like that

Explanation:

Answered by CopyThat
5

Answer:

JAVA::

Explanation:

import java.util.*;

class Brainly

{

static void main()

{

int n;

Scanner sc=new Scanner(System.in);

System.out.println(“Enter an integer:”);

n=sc.nextInt();

if((n>=100 && n<=999 || n>=-999 && n<=-100) && n%3==0)

System.out.println(“3-digit number divisible by 3”);

else

System.out.println(“Not a 3-digit number or divisible by 3”);

}

}

Similar questions