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,
4 months ago
Math,
4 months ago
India Languages,
4 months ago
History,
9 months ago
Chemistry,
1 year ago