Computer Science, asked by manthabhatia, 3 months ago


Write a program in Java to input any word and any integer and print it 25 times
using for loop).​

Answers

Answered by atrs7391
0

/*

Project Type: Brainly Answer

Date Created: 22-02-2021

Date Edited Last Time: ---NIL---

Question Link: Write a program in Java to

input any word and any integer and print it 25 times.

Program Created By: atrs7391

Programming Language: Java

Language version (When program created or last edited): jdk-15.0.2

*/

package Brainly_Answers.Program;

import java.util.Scanner;

public class For_Loop {

   public static void main(String[] args) {

       Scanner sc = new Scanner(System.in);

       System.out.println("Enter Word: ");

       String str = sc.nextLine();

       System.out.println("Enter Integer: ");

       int n = sc.nextInt();

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

           System.out.println(str);

           System.out.println(n);

       }

   }

}

Answered by aarushmishra1310
0

Answer:

public class Main {

 public static void main(String[] args) {

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

     System.out.println(i);

   }  

 }

}

Hope this will help

Similar questions