please answer both the questions
Attachments:
Answers
Answered by
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
Social Sciences,
5 months ago
Science,
5 months ago
Math,
5 months ago
History,
10 months ago
Chemistry,
1 year ago