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
Complete each of the following sentences by
Minchanka [31]

Answer:

something like

Explanation:

Audio digitization converts analogue

sound a sound wave

Digital audio is stored in binary

The process of audio digitization converts the

sound wave into a series of numbers.

5 0
2 years ago
Read 2 more answers
Why are listening and speaking part of the Common Core and ELD Standards? Why is this particularly important for our ELD student
Leona [35]

Answer:

Learning and speaking are core elements in ELD Standards. ELD emphasizes the importance of understanding academic and instructional languages necessary for academic success. For a better understanding of language instructions, there should be some form of communication between the learner and the educator. Communication itself entails listening appropriately and speaking accordingly to convey the right message.

Listening and speaking improves the language skills of students. They are also able to express themselves through speech.

Explanation:

3 0
4 years ago
What is an example of a reference marker that a source might use? quotation print Web page numbering
olya-2409 [2.1K]

Answer

page numbering

Explanation

Page numbering is where the writer employs a process of applying sequence of numbers to pages of a certain document may it be a book, a magazine, a news paper or any other document having pages.The reference marker that a source might use a page numbering  to be able to reference details that are referenced in other details. By this it reduces complication

3 0
3 years ago
Read 2 more answers
Por favor alguem poderia me falar qual PC e melhor: Computador Gamer Fox PC FPS Intel Core i5 8GB (GeForce GTX 1050Ti 4GB GDDR5)
Ivanshal [37]

Eu acredito no primeiro como ele tem uma GTX 1050ti, i5 e 2tb.

3 0
4 years ago
Create an application named TestClassifiedAd that instantiates and displays at least two ClassifiedAd objects. A ClassifiedAd ha
arlik [135]

Answer:

Following is given the code with all necessary descriptions as comments in it. The output is also attached under the code. I hope it will help you!

Explanation:

5 0
3 years ago
Other questions:
  • Num = int(input("Enter a number: "))
    5·2 answers
  • Most smartphones use operating systems developed by ________.
    10·1 answer
  • Using the ____ browsing mode offered by some browsers can prevent personal information from being left on a public computer.
    9·1 answer
  • What are the opportunities, and challenges, forged by digital transformation?
    13·1 answer
  • Write a short program that uses a for loop to write the numbers 1 through 10 to a file
    11·1 answer
  • Imagine Frankie has a computer with a full hard drive. She needs to create and save a new document, so she deletes a bunch of ol
    8·1 answer
  • Greedy Algorithm Design
    8·1 answer
  • What is the best way of transmitting data safely
    9·1 answer
  • Can someone please help me? (,:
    14·1 answer
  • 5. Javascript can be used for building apps and​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!