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
Write a program that asks the user to enter a number of seconds and then printsthe same amount of time in days, hours, minutes,
MariettaO [177]

Answer:3363 seconds

Explanation:3363 is equivalent to 0days 1 hour, 1 min, and 7 sec

8 0
3 years ago
Examination of Internet records in order to reveal the identity of an anonymous poster is defined as
Sergeu [11.5K]

Answer: Doxing

Explanation: Doxing which is also referred as doxxing is defined as the revealing or publishing of the private records or information to the public.It is considered as the illegal practice which is base on the the internet service.The publicizing of the private data or confidential information is punishable offence.

Other options are incorrect because filtering is the elimination of the not required content, spamming is the activity of sending undesired bulk messages and hacking is the attacking of the system using false means to corrupt and steal data.Thus the correct option is doxing.

6 0
3 years ago
Expressions coded in the HAVING clause
HACTEHA [7]

Answer:

A

Explanation:

Expressions coded in the HAVING clause can use either aggregate search conditions or non-aggregate search conditions.

Cheers

7 0
3 years ago
Why is it good to be a computer programmer?​
liubo4ka [24]

Answer:

It's your wish become other professions like doctor, engineer are also good. But in this profession you can make apps, websites and can do hacking. Which is are cool things to do. But every profession is best at it's profession.

Explanation:

If you like my answer than please mark me brainliest

5 0
2 years ago
________ is a markup language that allows for tagging selected elements of the content of documents for their meanings and is us
trasher [3.6K]

Answer:

E)nXML

Explanation:

XML is a short for Extensible Markup Language. It is a markup language like the Hypertext markup language (HTML) and are both used in the development of web applications. However while the HTML describes the content of the Web page that is the graphics, images and videos and how they are displayed, the XML handles the description of data and information formats, their storage and the transportation and sharing over the internet.

4 0
3 years ago
Read 2 more answers
Other questions:
  • When saving a file, you must provide a valid file name that adheres to specific rules, referred to as _______________.
    5·1 answer
  • Consider a single CPU system with an active process A. Explain what happens in the following circumstances including any interru
    13·1 answer
  • Write the document type declaration markup statement for an HTML5 file. Be sure to include the appropriate opening and closing b
    12·1 answer
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    9·1 answer
  • Digital signatures are as legally acceptable as written signatures.
    12·1 answer
  • What is the difference between technology and science?
    13·1 answer
  • A ___________ is a variable used to pass information to a method.
    11·2 answers
  • Explain the term creating in word processing​
    12·1 answer
  • What is the difference between php and html?​
    13·2 answers
  • Complete the sentence.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!