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
Vladimir [108]
3 years ago
10

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

nd after each line of text Ex: firstNumber
Computers and Technology
1 answer:
Citrus2011 [14]3 years ago
5 0

Answer:

The program to this question can be describes as follows:

Program:

#include <stdio.h> //defining header file

int main() //defining main method

{

int n,i,x=0; //defining integer variable

printf("Enter a number: "); //print message

scanf("%d",&n); //input value from the user  

printf("%d\n",n); //print input value

for(i=1;i<n;i++)  //loop to count reverse number

{

x=n-i; //calculate value

printf("%d\n",x);  //print value

}

return 0;

}

Output:

Enter a number: 3

3

2

1

Explanation:

  • In the above program, three integer variable "n,i and x" is declared, in which variable n we take input from the user end and the variable i and x is used in the loop to calculate the value in the reverse order.
  • In the next step, a loop is declared, in which the variable x calculates the value in reverse order and uses a print method to print its value.  
You might be interested in
Define Based Assessment ​
Oduvanchick [21]

Explanation:

In an educational setting, standards-based assessment is assessment that relies on the evaluation of student understanding with respect to agreed-upon standards, also known as "outcomes". The standards set the criteria for the successful demonstration of the understanding of a concept or skill -WIKIPEDIA

8 0
3 years ago
Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number an
Zanzabum

Answer:

See explaination

Explanation:

/File: ValidateCheckDigits.java

import java.io.BufferedWriter;

import java.io.File;

import java.io.FileWriter;

import java.io.IOException;

import java.util.Scanner;

public class ValidateCheckDigits {

public static void main(String[] args) {

String fileName = "numbers.txt"; //input file name

String validFileName = "valid_numbers.txt"; // file name of the output file

//Open the input file for reading and output file for writing

try(Scanner fileScanner = new Scanner( new File(fileName));

BufferedWriter fileWriter = new BufferedWriter( new FileWriter(validFileName))) {

//Until we have lines to be read in the input file

while(fileScanner.hasNextLine()) {

//Read each line

String line = fileScanner.nextLine().trim();

//calculate the sum of first 5 digits

int sum = 0;

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

sum += Integer.parseInt( line.charAt(i) + "");

}

//Get the last digit

int lastDigit = Integer.parseInt(line.charAt(5)+"");

//Check if the remainder of the sum when divided by 10 is equal to last digit

if(sum%10 == lastDigit) {

//write the number in each line

fileWriter.write(line);

fileWriter.newLine();

System.out.println("Writing valid number to file: " + line);

}

}

System.out.println("Verifying valid numbers completed.");

} catch(IOException ex ) {

System.err.println("Error: Unable to read or write to the file. Check if the input file exists in the same directory.");

}

}

}

Check attachment for output and screenshot

4 0
3 years ago
Computer are most wonderful creation of 21st century how ?​
son4ous [18]

Answer:

It can do all the functions at a speedy rate and also helps us to search and progress in our homes and businesses. A computer can therefore be called a calculator with a twist for not only does it perform fast calculations, but it also has other special characteristics.

Explanation:

hope it helps you

6 0
2 years ago
After adding an image to her flyer, Danica played around to see which layout would look the best. At one point, her text was on
Norma-Jean [14]

Answer:

Position Feature

Wrap text feature

Picture tools

Explanation:

3 0
3 years ago
Read 2 more answers
What is the meaning of a red wavy underline that appears under text in a publication?
matrenka [14]
It is a misspelling.
If you misspell a word the red wavy line will appear and give a suggestion when right clicked.
6 0
3 years ago
Read 2 more answers
Other questions:
  • A banker would like to present a spreadsheet as part of a presentation to potential clients. The spreadsheet makes use of severa
    14·1 answer
  • Which presentation software element can you use to create a model diagram with two concentric circles inside a triangle?
    10·2 answers
  • Have you ever tried to teach a class full of restless, active sixth-graders? I have. I taught sixth-grade students for 12 years.
    15·1 answer
  • What short (two letters!) but powerful boolean operator can check whether or not one string can be found in another string?
    12·1 answer
  • Based on current and upcoming gaming technologies, what changes do you expect to see in the next generation of gaming consoles?
    6·1 answer
  • Which do switches create?<br> Networks<br> Wireless access points<br> Routes<br> Collision domains
    13·1 answer
  • What are the process of boots up a computer?​
    15·2 answers
  • Consider the following code.
    7·2 answers
  • Working mechanism of computer ​
    10·1 answer
  • a company recently implemented a secure sockets layer/transport layer security (ssl/tls) version that supports secure hashing al
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!