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
ASHA 777 [7]
3 years ago
15

c programming Write code that prints: Ready! countNum ... 2 1 Go! Your code should contain a for loop. Print a newline after eac

h number and after each line of text Ex: countNum = 3 outputs: Ready! 3 2 1 Go! 1 2 3 4 5 6 7 8 9 10 11 12 13 #include int main(void) { int countNum; int i; countNum = 3; /* Your solution goes here */ return 0; } 1 2 3 4 5 Check Next
Computers and Technology
1 answer:
olga_2 [115]3 years ago
6 0

Answer:see explanation

Explanation:

Hello, from your question I see that you need a program which based on countNum's value prints ready then all the numbers to 1 and finally go!, I'd appreciate if you provided information about the numbers after the example you gave as I do not know if they are to be printed too.

The solution I provide includes the countdown to 1 printing newline after each number and text. Try it out!

#include <stdio.h>

int main(void)

{

   int countNum;

   int i;

   countNum = 22;

   for ( i = countNum; i > 0; i--) {

       if (i == countNum){

           printf("Ready!\n");

       }

       printf("%d\n",i);

   }

   printf("Go!\n");

   return 0;

}

You might be interested in
_______ is a communications protocol used to send information over the web. HyperText Markup Language (HTML). URL (Uniform Resou
nlexa [21]

TCP/IP is a communications protocol used to send information over the web.

Explanation:

TCP / IP, which stands for the Transmission Control Protocol / Internet Protocol, is a set of communication protocols used to connect internet network devices. The whole suite of the Internet Protocol — a set of rules and procedures — is commonly called TCP / IP.  

The TCP / IP protocol suite acts as a layer of abstraction between web applications and the routing / switching fabric. TCP / IP defines how data is shared over the internet by supplying end-to-end communications that specify how the data should be split into packets, signed, distributed, routed and received at the destination.

5 0
3 years ago
A cycle merchant allows 15% discount on the marked price of a bicycle and still he makes a profit
lions [1.4K]

Answer:

The program in Java is as follows:

public class Main{

public static void main(String[] args) {

 double discount_percent = 0.15;

 double discount_amount = 600;

 double profit = 0.20;

 double marked_price = discount_amount/discount_percent;

 double cost_price = marked_price/(1 + profit);

 System.out.println("Marked Price: "+marked_price);

 System.out.println("Cost Price: "+cost_price);

}}

Explanation:

For explanation purpose, let

MP \to Marked Price

\%D \to Percentage discount

D \to Discounted amount

\%P \to Percentage Profit

C \to Cost Price

The marked price (i.e. selling price) is calculated discount using:

MP = \frac{D}{\%D}

The derived formula of the cost price from percentage profit and Marked Price is:

C = \frac{M}{1 + \%P * 100}

So, the explanation is as follows:

The next three lines declare and initialize the given parameters

<em>  double discount_percent = 0.15;</em>

<em>  double discount_amount = 600;</em>

<em>  double profit = 0.20;</em>

Calculate marked price

 double marked_price = discount_amount/discount_percent;

Calculate cost price

 double cost_price = marked_price/(1 + profit);

Print marked price

 System.out.println("Marked Price: "+marked_price);

Print Cost price

 System.out.println("Cost Price: "+cost_price);

3 0
3 years ago
The type of meter used to test downstream digital signal quality
Levart [38]
I would say digital modulated signals  <span />
3 0
3 years ago
Mention<br>any<br>5<br>indicators of<br>happiness​
Maru [420]

Answer:

5 indicators of happiness that might surprise you · Happiness is deep · Happy is busy · Can't buy me happiness · The happiness gene · No regrets.

Explanation:

5 0
3 years ago
Read 2 more answers
even if we reach that state where an AI can behave as human does,how do we measure if AI is acting like a human?
xxTIMURxx [149]

A person can be able to measure if AI is acting like a human by the use of   Turing test.

<h3>How do we measure of artificial intelligence is acting like a human?</h3>

One can measure if AI is  Acting humanly via the use of a human who is said to interrogates the program and also the use of another person through the use of a terminal simultaneously.

Note that If after some amount of time or period, the interrogator is said to be unable to tell which is which, the program is said to have passed. To pass this test it is one that needs natural language processing.

Hence, A person can be able to measure if AI is acting like a human by the use of Turing test.

Learn more about AI from

brainly.com/question/25523571

#SPJ1

4 0
1 year ago
Other questions:
  • What is the drawback of the linear model?
    5·2 answers
  • How do you interpret field in contest of a DBMS?
    5·1 answer
  • Which finger types the return or enter key?
    6·2 answers
  • Define a romanNumberToInt function that converts a RomanNumber value, which is a list of Roman digits, into an integer. Hints: -
    7·1 answer
  • Ned and Mary Ann are saving their files to a CD. When prompted, Ned will click on Burn file to disk, indicate the recording spee
    15·1 answer
  • In Microsoft Word, when you highlight existing text you want to replace, you're in
    7·1 answer
  • 11. Its collection of toys which could be used in the game via an implanted RFID chip made Activision’s game _______ one of the
    7·2 answers
  • Drag the tiles to the boxes to form correct palrs.
    9·1 answer
  • Why is it important to prepare the farm resources before you start working? explain​
    14·1 answer
  • Which discipline focuses on the design of computer hardware?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!