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
daser333 [38]
3 years ago
7

"Write code that prints: Ready! countNum ... 2 1 Start! Your code should contain a for loop. Print a newline after each number a

nd after each line of text Ex: countNum = 3 outputs: Ready! 3 2 1 Start!"
Computers and Technology
1 answer:
BartSMP [9]3 years ago
6 0

Explanation:

#include <iostream.h>

#inlcude<conion.h>

void main()

{

  int count, x;

  clrscr();

  cout<<"Enter the count:";

  cin>> count;

  cout<<"Ready!\n";

  for(x=count;x>0;x--)

  {

     cout<<x<<"\n";

  }

  cout<<"Start";

  getche();

}

This is a simple program where the output is expected to be in reverse order. So we run a for loop starting from the count and decrements the counter by 1 every time when the loop runs and print the value. So to print the output in "new line" we include "\n".

You might be interested in
A user deletes a message from a mailbox while on a desktop. What happens to the email message on the user's synchronized devices
gulaghasi [49]

Answer:

Explanation:

Depends on the configuration of the email because there are two protocols POP and IMAP, the most recent protocol is IMAP, we can delete an email and this It moves to a To be Deleted folder, this happens because the email is stored in the server, but with the protocol POP the email is stored in the server and downloaded to the application, if you delete an email, this is deleted in all devices.

8 0
3 years ago
Read 2 more answers
A____consists of many users and their information.​
grin007 [14]

<u>Active Directory</u> consist of many users and their information.

7 0
1 year ago
Read 2 more answers
Help with what the awnser is
wariber [46]
Flute on a boot ;) hope i helped

8 0
3 years ago
The piston ring isn't a completely solid ring; instead, it's usually split at one point. This split or gap in the ring is called
Umnica [9.8K]
<span>Answer: Ring end gap
 Ring end gap is the split or gap in the ring. The piston ring is split at one point and it is not completely solid ring and the split/ gap is termed as ring end gap.</span>
8 0
3 years ago
Read 2 more answers
write a java program to accept three item names and prices, and output them. Also output the average price if one of the items i
N76 [4]

Answer:

// program in java.

// package

import java.util.*;

// class definition

class Main

{

// main method of the class

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

{

   try{

    // scanner object to read input

Scanner scr=new Scanner(System.in);

 // string array

String name[] = new String[3];

 // price array

      double price[] = new double[3];

      // variable

      double sum = 0,avg;

      boolean flag = false;

      // read three name and their price

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

      {

          System.out.print("Enter item "+(i+1)+" name:");

          name[i]=scr.next();

          System.out.print("Enter item "+(i+1)+" price:");

          price[i]=scr.nextDouble();

          sum=sum+price[i];

          // if any name is "peas"

          if(name[i].equalsIgnoreCase("peas"))

          flag = true;

      }

System.out.println("Name and their price:");

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

      {

          System.out.println(name[i]+":"+price[i]);

         

      }

      // if flag is true

      if(flag)

      {

      // calculate average

          avg=sum/3;

          // print average

          System.out.println("Average price is:"+avg);

      }

      else

      System.out.println("no average output");

   

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read three name and their price from user.If any name is equal to "peas" without case sensitive then find the average of three price and print the average.If their is no name equal to "peas" then print "no average output".

Output:

Enter item 1 name:apple                                                                                                    

Enter item 1 price:20                                                                                                      

Enter item 2 name:kiwi                                                                                                    

Enter item 2 price:15                                                                                                      

Enter item 3 name:banana                                                                                                  

Enter item 3 price:20    

Name and their price:

apple:20

kiwi:15

banana:20                                                                                            

no average output

8 0
3 years ago
Other questions:
  • Suppose that sum is an int variable. The statement sum += 7; is equivalent to the statement sum = sum + 7;
    7·1 answer
  • • Describe the steps in detail that the operating system performs to handle interrupts, including ISRs, the stack, and hardware?
    5·1 answer
  • You can access a button s screentip by _____.
    6·1 answer
  • The use of themes in WordPress is a good illustration of what major concept?
    6·1 answer
  • What kinds of dogs are there
    9·2 answers
  • How many spaces should you use for an indent?
    10·1 answer
  • Binary is used to store what on a computer?<br> •Data<br> •Dates<br> •Address
    13·2 answers
  • Select all correct statements below: Group of answer choices A redundant link's switch port will be blocked by STP until needed.
    6·1 answer
  • What are the benefits and drawbacks of a desktop utilising virtualisation and a server?
    12·1 answer
  • If you have created users with administrator privileges on your windows 7 or linux systems, why bother creating other user accou
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!