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
pashok25 [27]
4 years ago
6

How do you get a code in C to count down from 5??

Computers and Technology
1 answer:
Valentin [98]4 years ago
5 0

Answer:

This is what the code should do:

“Lift off in T minus

5

4

3

2

1

Blast-off!”

When I run it, it just keeps printing ''Sum = 5'' forever.

Explanation:

Code:

int main(void) {

int sum = 5;  

int i;      

printf("Lift off in T minus\n");

for (i = 0; i < 5; i=i+i) {

   sum = sum - i;  

   printf("sum = %d\n",sum);  

}  

printf("Blast-off",sum);  

return 0;

You might be interested in
Which fingers do you use to type the following letters rtgvf
Allushta [10]
Middle,index,index,thumb,middle
3 0
3 years ago
If a device does not require a driver, it is _____.
xxTIMURxx [149]

Answer:

(B) plug and play

Explanation:

If a device does not require a driver, it is <u>plug and play</u>. Plug and Play (PnP) is a combination of hardware and software support that enables a computer system to recognize and adapt to hardware configuration changes with little or no intervention by a user, including the loading of appropriate drivers.

7 0
4 years ago
Spreadsheets: what is a column?
Travka [436]

Answer:

a group of cells stacked upon each other; vertical group

4 0
3 years ago
E-banking is also called: [1]
DENIUS [597]
Answer 1 it’s online banking
3 0
3 years ago
The variable grade can have any real number value from 0 to 100. Ask the user to enter a grade in numerical form. Write an if-el
Alborosie

Answer:

See explaination

Explanation:

#include <iostream>

using namespace std;

int main()

{

float marks;

cout<<"Enter your grade value :";

cin>>marks;

if(marks>=90)

cout<<"Your grade is 'A'";

else if(marks>=80&& marks<90)

cout<<"Your grade is 'B'";

else if(marks>=70&& marks <=80)

cout<<"Your grade is 'C'";

else if(marks>=60&& marks <70)

cout<<"Your grade is 'D'";

else

cout<<"Your grade is 'F'";

}

8 0
3 years ago
Other questions:
  • In Linux Operating System, what file extension is used forexecutable files?
    6·1 answer
  • Obtain the 10’s complement of the following six-digit decimal numbers:<br><br> 123900<br><br> 980657
    10·1 answer
  • Which activity constitutes legal computer activity?
    12·1 answer
  • In the Microsoft publisher application, words underlined in red are ____.
    6·1 answer
  • A ______ allows a hacker to gain access to your computer and take almost complete control of it without your knowledge.
    12·2 answers
  • In fixed-width files, each record is on a separate line and the fields are separated by a special character.
    7·1 answer
  • Which command should you select to track changes in a document?
    9·2 answers
  • ASAP BRAINLIEST
    13·2 answers
  • Choose the item which best describes the free frame list. 1. a per process data structure of available physical memory 2. a glob
    7·1 answer
  • Why is computer called and information processing machine​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!