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]
3 years ago
6

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

Computers and Technology
1 answer:
Valentin [98]3 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
Choose the appropriate software category for each specific application shown.
Tom [10]
Python is the correct answer
7 0
2 years ago
Consider the following code:
ICE Princess25 [194]

Answer: 3

Explanation:

Because X = 18 and our condition given to the code if > and < which do not match with the input so it prints 3.

4 0
3 years ago
Which statements describe OneDrive?
Vesna [10]

Answer:

OneDrive is a storage location on your personal computer.

Explanation:

Its gives u extra storage as well as helps u to take backup for all ur files that are important to u

Hope this helps...

Pls mark my ans as brainliest

If u mark my ans as brainliest u will get 3 extra points

6 0
3 years ago
Read 2 more answers
What is the best game of 2020 in pc​
dybincka [34]

Answer:we have games like alien wars call of duty astro avengers

Explanation:8

8 0
3 years ago
Read 2 more answers
JAVA
butalik [34]

Answer:

import java.util.*;

public class MyClass {

   public static void main(String args[]) {

       Scanner input = new Scanner(System.in);

       System.out.print("Input a word: ");

       String userinput = input.nextLine();

       for(int i =0;i<userinput.length();i+=2) {

           System.out.print(userinput.charAt(i));

       }

   }

}

Explanation:

This line prompts user for input

       System.out.print("Input a word: ");

This declares a string variable named userinput and also gets input from the user

       String userinput = input.nextLine();

The following iterates through every other character of userinput from the first using iteration variable i and i is incremented by 2

       for(int i =0;i<userinput.length();i+=2) {

This prints characters at i-th position

           System.out.print(userinput.charAt(i));

5 0
2 years ago
Other questions:
  • You can use ___________ to add dynamic features to a webpage such as search box that completes your search text automatically.
    12·1 answer
  • A DSLR camera is made up of two parts. They are
    13·2 answers
  • What does zooming do? A. Changes your view of the Frame Editor to be closer or farther away B. Changes your view of the Event Ed
    12·1 answer
  • What are the two major components of a processor cooler assembly?
    15·1 answer
  • Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the
    13·1 answer
  • Gmod how to make someone admin on a lan server
    6·2 answers
  • Which of these is the function of a modeler?
    5·2 answers
  • Which lighting direction is used to create silhouettes
    15·1 answer
  • Write a Python function that join the two string and print it ​
    14·2 answers
  • Differentiate between patent and copyright.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!