473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Reading numbers from a text file

Create a notepad file named number.txt which consists of int type numbers separated with new lines on your hard disk. Write a program which read the numbers form this file and show them to screen, also display the total numbers in files and largest and smallest numbers to the screen.



Write a simple structure named Students. This structure consists of three variables Name, GPA and TotalMarks. Now write three variables of data type Students. Get value from user for these three students and show them on screen.
May 26 '07 #1
2 2364
DeMan
1,806 1GB
I think you might like to peruse the Posting Guidelines


Once you have read and understood them, you may also like to have a look at this here
May 26 '07 #2
nemisis
64
Create a notepad file named number.txt which consists of int type numbers separated with new lines on your hard disk. Write a program which read the numbers form this file and show them to screen, also display the total numbers in files and largest and smallest numbers to the screen.
As DeMan said check the post guides and the link he has given will help you . If u still have trouble while building post it here.

Write a simple structure named Students. This structure consists of three variables Name, GPA and TotalMarks. Now write three variables of data type Students. Get value from user for these three students and show them on screen.
Again as DeMan said check POST RULES!!! now why did I bump into this which is EXACTLY same as yours but from a different user at an earlier time?
May 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: adpsimpson | last post by:
Hi, I have a file which I wish to read from C++. The file, created by another programme, contains both text and numbers, all as ascii (it's a .txt file). A sample of the file is shown below: <<...
3
by: muser | last post by:
With the following code I'm trying to read a text file (infile) and output inaccuracies to the error file (printerfile). The text file is written and stored on disk, while the printerfile has to be...
9
by: EkteGjetost | last post by:
I would like to first apologize to those of you who read my last post "desperately need help". As a regular on other forums i can understand how aggravating it would be to have someone come on who...
3
by: Millennium Falcon | last post by:
Hi! Help is kindly requested in reading floating point numbers from a text file. File is organized like this : 2000 // number of data -1.00000 -2.000000 -0.008944 // x, y & z-coordinates to...
9
by: jeff M via .NET 247 | last post by:
I'm still having problems reading EBCDIC files. Currently itlooks like the lower range (0 to 127) is working. I have triedthe following code pages 20284, 20924, 1140, 37, 500 and 20127.By working I...
10
by: nuke1872 | last post by:
Hello guys, I have a file names network.txt which contains a matrix. I want to read this matrix as store it as an array. I am new to stuff like these...can anybody help me out !! Thanks nuke
11
by: Girish Sahani | last post by:
I wrote the following code to concatenate every 2 keys of a dictionary and their corresponding values. e.g if i have tiDict1 = tiDict1 = {'a':,'b':} i should get tiDict2={'ab':} and similarly for...
10
by: LuTHieR | last post by:
Hi, I'm reading a string of numbers from a file (using Borland C++ Builder 6), and I'm doing it like this: first I use FileRead to store all the data in the file to a char* variable (appropriately...
6
by: Nick | last post by:
Hiya, Am having a few problems with StreamReader. I'm trying to open a text file, and read 5 columns, and put them into an array, and then do a calculation and read the next line of data, and...
32
by: Bill Cunningham | last post by:
I am interested in writing a numeric text reader. This only reads numbers of securities and stores them. Nice practice. I have determined that these functions are needed. isalpha, isdigit,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.