Using Netbeans java- Question :copy and paste these 2 program codes and add them into the program (netbeans java) and compile them and screenshot of both outputs after compilation, 1 and 2 separate screenshots. please do it for me quick as possible i need it in less than an hour atleast.please! do it quick thank you very much
Using Netbeans java- Question :copy and paste these 2 program codes and add them into the program (netbeans java) and compile them and screenshot of both outputs after compilation, 1 and 2 separate screenshots. please do it for me quick as possible i need it in less than an hour atleast.please! do it quick thank you very much
1.Main.java
---------------------------
public class Main
{
public static void main(String[] args) {
int i1=100;
while(i1!=0)//while loop
{
System.out.println("sadiq");
i1-=2;
}
for(int i3=100;i3>0;i3-=2){//for loop
System.out.println("sadiq");
}
}
}
2.Main.java
-----------------------------------
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int num1=sc.nextInt();
int num2=sc.nextInt();
if(num1==num2)
{
System.out.println("Two int are same");
}else{
System.out.println("Two int are not same");
}
}
}
Step by step
Solved in 2 steps with 3 images