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
emmainna [20.7K]
4 years ago
6

In C++ :

Computers and Technology
1 answer:
elena-s [515]4 years ago
8 0

Answer::

//Program is written in C++ Programming Language

// Comments are used for explanatory purpose

#include

#include

#include

#include

using namespace std;

int main(){

ifstream file; // File stream object

string name; // To hold the file name

string inputLine; // To hold a line of input

int lines = 0; // Line counter

int lineNum = 1; // Line number to display

// Get the file name.

cout << "Enter the file name: ";

getline(cin, name);// Open the file.

file.open(name.c_str());// Test for errors.

if (!file){

// There was an error so display an error

// message and end the PROGRAM.

cout << "Error opening " << name << endl;

exit(EXIT_FAILURE);

}

// Read the contents of the file and display

// each line with a line number.

// Get a line from the file.

getline(file, inputLine, '\n');

while (!file.fail()){

// Display the line.

cout << setw(3) << right << lineNum<< ":" << inputLine << endl;

// Update the line DISPLAY COUNTER for the next line.

lineNum++;// Update the total line counter.

lines++;// If we've displayed the 24th line, pause the screen.

if (lines == 24){

cout << "Press ENTER to CONTINUE...";

cin.get();

lines = 0;

}

// Get a line from the file.

getline(file, inputLine, '\n');}

//Close the file.

file.close();

return 0;}

You might be interested in
Many shops are simply plugging up their drains to keep from inadvertently violating the law and creating environmental contamina
barxatty [35]

the answer is true hope this helps have a wonderful day/night

8 0
3 years ago
What are the differences between message confidentiality and message integrity? Can you have confidentiality without integrity?
Artist 52 [7]

Answer:

message confidentiality

Two or more hosts communicate securely, typically using encryption. The communication cannot be monitored (sniffed) by non trusted hosts. The communication between trusted parties is confidential.

message integrity

The message transported has not been tampered with or altered. A message has integrity when the payload sent is the same as the payload received.

Sending a message confidentially does not guarantee data integrity. Even when two nodes have authenticated each other, the integrity of a message could be compromised during the transmission of a message.

Yes, you can have integrity of a message without confidentiality. One can take a hash or sum of the message on both sides to compare. Often we share downloadable files and provide data integrity using md5 hash sums.

Explanation:

3 0
3 years ago
The pseudo-class selectors for links let you use CSS to change the formatting for all but one of the following. Which one is it?
aev [14]
B. A link that is inactive
7 0
3 years ago
Which layer of the iOS architecture is responsible for text and typography?
horsena [70]

Answer:

b

Explanation:

Its Media layer. its this one

5 0
3 years ago
Read 2 more answers
Which type of input peripheral is most prevalent in a Point of Sale system?A. External USB storage.
Darina [25.2K]

Answer:

B. Card reader.

Explanation:

Peripheral devices are generally auxiliary devices such as mouse, keyboard, card reader, pen drives, microphones, graphics cards, etc. that are connected with the computer are work in some way with it. In Point of sale (POS) devices card reader are used to read debit or credit cards.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Groups to which we belong are defined late in our development true or false
    11·1 answer
  • A water-sports company specializes in custom-made watercrafts and accessories.Their marketing manager decides to use the broad-m
    12·1 answer
  • Which workplace trend are outsourcing and telecommuting are examples of? Please select the best answer from the choices provided
    13·2 answers
  • The sun is a type of what?
    9·1 answer
  • The _____ feature will mark all changes made to a document for others to review at a later time.
    13·1 answer
  • What does the gym member need to give?​
    8·1 answer
  • Draw the final structure that will house the electronic system​
    15·1 answer
  • NFPA 780, Standard for the Installation of Lightning Protection Systems provides information on the installation of _____ for li
    6·1 answer
  • Which key must be pressed in addition to clicking on a hyperlink for it to be followed?
    7·1 answer
  • The SQL SELECT built-in function COUNT ____.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!