Computer Science, asked by khatunarmina111, 4 months ago

java programe solve it​

Attachments:

Answers

Answered by 1minutememes1208
0

//java program to check even or odd number

import java.util.*;           //to accept an number

public class EvenOrOdd

{

    public static void main(String args[])

    {

        Scanner in=new Scanner(System.in);

        System.out.println("enter the number");

        int num=in.nextInt();

        if(n%2==0)

        {

              System.out.println("even number");

        }

        else

        {

              System.out.println("Odd number");

        }

   }

}

//java program to multiply two numbers

import java.util.*;           //to accept numbers

public class Multiplication

{

    public static void main(String args[])

    {

        Scanner in=new Scanner(System.in);

        System.out.println("enter the number 1");

        int num=in.nextInt();

        System.out.println("enter the number 2");

        int num1=in.nextInt();

       

        int m = num*num1;

        System.out.println("multiplied number = "+m);

   }

}

Similar questions
Math, 11 months ago