Computer Science, asked by Anonymous, 1 year ago

Write a program to print your name and school name(in 2 different line) 100 times using for loop in java

Answers

Answered by Anonymous
5

import java.util.Scanner;

public class Toto {

public static void main(String[] args) {

// TODO Auto-generated method stub

Scanner sc = new Scanner(System.in);

System.out.println("Give a name : ");

String name = sc.nextLine();

for (int i = 0; i < 501; i++){

System.out.println(i + " " + name);

}

}

}

Answered by mamonipandit2872
1

Answer:

galat answer pehle wala

Similar questions