1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anvisha [2.4K]
4 years ago
7

Write a for loop that displays your name and student number 12 times.

Computers and Technology
1 answer:
d1i1m1o1n [39]4 years ago
5 0

Answer:

// here is code in java.

import java.util.*;

// class definition

class Solution

{

// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // scanner object

       Scanner s=new Scanner(System.in);

        // variables

      String s_name;

      int s_num;

      System.out.print("Please enter the name:");

       // read the student name

      s_name=s.nextLine();

      System.out.print("Please enter the number:");

       // read the student number

      s_num=s.nextInt();

       // print name and number 12 times

      for(int i=0;i<12;i++)

      {

          System.out.println(s_name+"----"+s_num);

      }

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create a scanner class object to read input from user.Read the student name and the number from user and assign them to variable "s_name" and "s_num".Print the student name and number 12 times with the help of for loop.

Output:

Please enter the name:Mary Kaur

Please enter the number:123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

Mary Kaur----123456

You might be interested in
Which file extension takes less storage space?
anyanavicka [17]

I believe the answer would be the JPEG file extension.

4 0
3 years ago
Read 2 more answers
PLEASE HELP QUICK ASAP NO LINKS PYTHON CODING
Mademuasel [1]

Answer:

its for the movement

Explanation:

6 0
3 years ago
Read 2 more answers
Kerrri uses a database file many time a day. To increase her productivity, she should___.
Dmitriy789 [7]

Answer:

D

Explanation:

A shortcut will make it easier for her to access the database file

4 0
3 years ago
You work as the IT security administrator for a small corporate network. You have designed the physical security of the offices
ladessa [460]

The security IT administrator he or she is planning to install smart card communications over the network which is can be access through TCP IP address.

Smart card key reader to be placed or installed where is required  such as an opening door  or entrance of office or organization extra.

Key card readers should be contactless and record more volume of data and it should synchized with the system at regular intervals.

By Installing smart card and it readers unauthorized  person entry to lab or network server can be avoided. Since smart card reader connected to the network, IT SECURITY administrator can generate log reports.

5 0
3 years ago
Should I Buy a 2070 super or 2060 super
fiasKO [112]

Answer:

Which ever one you want

Explanation:

Make your heart happy

8 0
3 years ago
Other questions:
  • An operating system is an example of which of the following
    13·1 answer
  • Collins and quillian explained the results of priming experiments by introducing the concept of _____ into their network model.
    12·1 answer
  • what is it called when you are biying and selling products via electronic channels such as the internet​
    13·2 answers
  • Fundamental types of data, such as strings, integers, and real numbers, are known as
    5·1 answer
  • Regarding the systems development​ process, ________ addresses the​ question, "Is the system producing the desired​ results?"
    12·1 answer
  • Which setting on a profile makes a tab NOT accessible in the All App Launcher or visible in any app, but still allows a user to
    11·1 answer
  • What kind of device is hardware capable of transferring items from computers t and devices to trans?
    5·1 answer
  • ∑_(A,B,C,D,E)▒〖(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30)〗
    8·1 answer
  • True or false you can create a. network with 2 computers?<br>​
    7·2 answers
  • The events that happen in a story are called the _________________.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!