Computer Science, asked by pallavisingh54, 10 months ago

please answer both the questions​

Attachments:

Answers

Answered by amitathawale45
1

int i=0;

for(i=0;i<10;i++)

{

System.out.println("hello world");

}

2

import java.util.scanner;

// Compiler version JDK 11.0.2

class Dcoder

{

public static void main(String args[])

{

Scanner input=new Scanner(System.in);

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

int num=input.nextInt();

if(num%2=0){

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

}

else{

System.out.println("numberis odd");

}

}

}

Similar questions