{}
BLACK NOVEMBER
Get 83% off PRO
Are you struggling to build your coding confidence or land your first job?
Fast-track to your first pay-check.
Start FREE trial →
Start FREE trial →
BLACK NOVEMBER
Get 83% off PRO
Are you struggling to build your coding confidence or land your first job?
Fast-track to your first pay-check.
Start FREE trial →
Start FREE trial →
run-icon
Main.java
import java.util.Scanner; class HelloWorld { public static void main(String[] args) { Scanner sc =new Scanner(System.in); System.out.print("enter the size of array="); int n=sc.nextInt(); System.out.print("enter the marks of students="); int arr[]= new int[n]; for(int i=0; i<=n-1; i++){ arr[i]=sc.nextInt(); } for(int i=0; i<=n-1; i++){ if(arr[i]<35) System.out.println("roll no. is="+i+" "); } } }
Output