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
Olegator [25]
3 years ago
13

Account numbers sometimes contain a check digit that is the result of a mathematical calculation. The inclusion of the digit in

an account number helps ascertain whether the number is a valid one. Write an application named CheckDigit that asks a user to enter a four-digit account number and determines whether it is a valid number. The number is valid if the fourth digit is the remainder when the number represented by the first three digits of the four-digit number is divided by 7. For example, 7770 is valid, because 0 is the remainder when 777 is divided by 7. If the account number is valid, output The account number is valid. If the account number is invalid output Invalid. If the account number is too short or too long output Account number invalid - it must have 4 digits.
Computers and Technology
1 answer:
marishachu [46]3 years ago
3 0

Answer:

using System;

class CheckDigit

{

public static void Main (string[] args)

{ //Accepting value from user

Console.WriteLine ("Enter a four-digit account number");

int acc = Convert.ToInt32(Console.ReadLine());

int d=acc%10; //extracting the last digit

acc=acc/10; //having the first three digit

if(acc % 7 == d) //checking and displaying

Console.WriteLine ("Valid Account Number");

else

Console.WriteLine ("Invalid Account Number");

}

}

Explanation:

You might be interested in
A loop decision point for an algorithm consists of three features: an initial value, a set of actions to be performed, and a(n)
pychu [463]

Answer:

Option c is the correct answer for the above question.

Explanation:

A loop is used to repeat some lines in some specific times which depends on some conditions of the loop. If a person wants to print "welcome" on 5 times then he can do this by two ways one is writing a print statement 5 times and the other is states a loop that executes 5 times through condition. The loop is described or written by three necessary points which are:-

  1. The fist is to initialize the initial value which tells the compiler for the starting point of the loop.
  2. The second is to any action for that condition variable which takes the loop for the direction of ending points.
  3. The third is a condition that defines the ending point of the loop.

The above question also states about the loop in which first and second points are given then the third point is necessary to complete the sentence which is states in option c. Hence the option c is correct while the other is not because--

  • Option 'a' states about the class operator which is not the part of the loop.
  • Option b states about the documentation plan which is also not the part of the loop.

5 0
4 years ago
1. What is the Internet?
3241004551 [841]
A place to watch daisy Taylor vids
8 0
3 years ago
Read 2 more answers
1-5 Safety measures in the use of kitchen tools and equipment.​
gladu [14]

Answer:

Safety measures are as follows;

Explanation:

  • Hold the delicate instruments cautiously to use them.
  • Require appropriate use of the equipment in the kitchen.
  • Users should remove these defective instruments or discard of them.
  • During and before use, check that perhaps the resources that will be used are indeed safe.
  • In a cold and dry spot, all equipment must be kept.
4 0
3 years ago
Write Python code to save the data to a MongoDB collection:Import json module to parse JSON dataImport MongoClient from pymongo
Zigmanuir [339]

Answer:

Explanation:

The objective of this task is to compute a program that involves the usage of Python code to save the data to MongoDB and to query  the database.

Due to the error that occur which makes me to be unable to submit this answer, I've created a word document instead and the attached file can be found below.

Thanks!

Download docx
8 0
3 years ago
Use the pulley image below to help u answer. click on it if u cant see.
Crank
1 is 2 2 is 0 because the pull of the box is removed
8 0
3 years ago
Read 2 more answers
Other questions:
  • A(n) __________ can include a computer's full operating system, applications, and system settings, including security and config
    7·1 answer
  • Is anyone good with auto Cad?
    7·1 answer
  • Active space is important in which type of photograph?
    12·2 answers
  • Stopping, standing, or parking is prohibited _____________.
    14·1 answer
  • Algorithm to find volume of cuboid​
    14·1 answer
  • Strengths and weaknesses about esport
    10·1 answer
  • In 3-5 sentences describe whether or not files should be deleted from your computer explain your answer
    12·1 answer
  • What type of system enables computer data to be stored in multiple locations and shared with multiple users simultaneously?
    6·1 answer
  • Which of these is NOT an input device?
    14·1 answer
  • Tim is a project manager. He is brainstorming with his team about problems that could arise during the next phase of the project
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!