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
Tju [1.3M]
1 year ago
12

This is a graded practice activity. This is not an actual quiz.

Computers and Technology
1 answer:
Lerok [7]1 year ago
8 0

Answer:

0

Explanation:

x=27

y=5

22+(27-5)

22+(22)

0

You might be interested in
What language used orthogonality as a primary design criterion?
pogonyaev
LIPS a functional language is one in which computations are made primarily by applying function to given program
4 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
Ann has always wanted to be the person on the news broadcast who delivers the weather updates. She’s looking into becoming a bro
Marrrta [24]
The answer should be A.
5 0
3 years ago
Read 2 more answers
West Point Bridge Designer | Does anyone know a way to make this bridge cost less?
e-lub [12.9K]
Make the zig zag part more spaced out
4 0
3 years ago
As a student, why do you need to know and follow the steps printing a <br><br>document?​
Kazeer [188]
So I am able to print my math notes and keep up in geometry.
7 0
3 years ago
Read 2 more answers
Other questions:
  • A(n) ____ is a client, server, or other device that can communicate over a network and is identified by a unique number, known a
    10·1 answer
  • What is the most recognized and widely used database of published nursing practice literature?
    15·1 answer
  • What is a binary message
    12·2 answers
  • 1. What is Java SE?
    11·2 answers
  • Should I Buy a 2070 super or 2060 super
    6·1 answer
  • Complete the do-while loop to output every number form 0 to countLimit using printVal. Assume the user will only input a positiv
    9·1 answer
  • A TCP Sender is just about to send a segment of size 100 bytes with sequence number 1234 and ack number 436 in the TCP header. W
    5·1 answer
  • 19 dollar fortnite giftcard who wants it
    15·2 answers
  • How many different textile items would you find at a festival? (please list 5 items)
    7·1 answer
  • What are the significances of blogs?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!