Pronlem# 1: How can I Create a notepad file named number.txt which
consists of int type numbers separated with new lines on your hard
disk, 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. Please guide me I will be very thank
full to you.
problem # 2: 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. 4 2089
* Ka**********@gm ail.com:
Pronlem# 1: How can I Create a notepad file named number.txt which
consists of int type numbers separated with new lines on your hard
disk,
That I won't tell you. Lay off my hard-disk.
a program which read the numbers form this file
Ditto.
and show them to
screen, also display the total numbers in files and largest and
smallest numbers to the screen. Please guide me I will be very thank
full to you.
This sounds like homework.
Read the FAQ's advice about posting homework questions.
problem # 2: 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.
This sounds like homework.
Read the FAQ's advice about posting homework questions.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
On May 22, 3:47 am, Kausar.Na...@gm ail.com wrote:
Pronlem# 1: How can I Create a notepad file named number.txt which
consists of int type numbers separated with new lines on your hard
disk, 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. Please guide me I will be very thank
full to you.
There is no such thing as a notepad file, you mean a plain text file.
You can open Notepad and just create the file using the keyboard.
Reading from that file should be a simple task using a std::fstream
(std file stream).
I'ld suggest a std::vector< int to store the integers.
>
problem # 2: 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.
That question gets asked a lot here (its Student, not Students). The
funny thing is most that do ask about it at least show an attempt at
creating the type Student.
On 22 mei, 10:10, Salt_Peter <pj_h...@yahoo. comwrote:
On May 22, 3:47 am, Kausar.Na...@gm ail.com wrote:
Pronlem# 1: How can I Create a notepad file named number.txt which
consists of int type numbers separated with new lines on your hard
disk, 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. Please guide me I will be very thank
full to you.
There is no such thing as a notepad file, you mean a plain text file.
You can open Notepad and just create the file using the keyboard.
Reading from that file should be a simple task using a std::fstream
(std file stream).
I'ld suggest a std::vector< int to store the integers.
problem # 2: 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.
That question gets asked a lot here (its Student, not Students). The
funny thing is most that do ask about it at least show an attempt at
creating the type Student.
You are very hard on this poster. Maybe he is just a student which
spents to much time in the pub (I get a deja vu feeling).
You should get an A if you try Boost.Serializa tion ( www.boost.org).
Serializing integers / structs to (and from) file is then only a
matter of writing the correct archive operator.
If you don't have that ambition using ostream_iterato rs and
istream_iterato rs on std::fstream will do the job as well.
<Ka**********@g mail.comwrote:
Pronlem# 1: How can I Create a notepad file named number.txt which
consists of int type numbers separated with new lines on your hard
disk, 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. Please guide me I will be very thank
full to you.
There are two parts to this. Create the file and then process the file.
You can do the first part with the Notepad program on your computer.
Pseudocode for part 2.
-----
open the file
smallest so far = a very big number
biggest so far= a very small number
ct = 0
repeat
read a datum
update the variables
until done
print the results
close the file
-----
problem # 2: 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.
I don't see how anyone could possibly help on this without giving the
answer, which is no help at all. I think the question has a significant
flaw, it should be Student, not Students. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: stu_gots |
last post by:
I have been losing sleep over this puzzle, and I'm convinced my train
of thought is heading in the wrong direction. It is difficult to
explain my circumstances, so I will present an identical make-believe
challenge in order to avoid confusing the issue further.
Suppose I was hosting a dinner and I wanted to invite exactly 12 guests
from my neighborhood. I'm really picky about that... I have 12 chairs
besides my own, and I want them all...
|
by: Jason |
last post by:
Hi,
I was wondering if any could point me to an example or give me ideas on how
to dynamically create a form based on a database table? So, I would have a
table designed to tell my application to create certain textboxes, labels,
and combo boxes? Any ideas would be appreciated.
Thanks
|
by: Mat |
last post by:
I am developping multi-user windows application. i use Access database.
user edit, add and delete data from database.
Request:
when an item is deleted ,added or modified by an user, all others user in
the network which has application running should automatically see the
change. in case of remove action, the item should disappear from the
listview.
|
by: CoreyWhite |
last post by:
It is possible to use martingale probability theory to beat some games
of chance. In a fair game of coin toss, where the odds reach an
equilibrium of 50/50 chain reactions do occur. This can be explained
using martingale probability theory, but in simpler terms it only shows
an example of how order emerges out of chaos.
Example: One player has 3 pennies, and another player has only 1 penny.
A fair coin is tossed every round to determine...
|
by: settyv |
last post by:
Hi,
Below is the Javascript function that am trying to call from asp:Button
control.
<script language="javascript">
function ValidateDate(fromDate,toDate)
{
var fromDate=new Date();
| |
by: shapper |
last post by:
Hello,
For the past hours I have been trying to solve a problem which is
driving me crazy.
I have to different codes where the problem to solve is the same:
CODE 1 (Transforms a XML document using a XSL file):
Function Trans()
|
by: rocksoft |
last post by:
Hi,
I am working in asp.net with C# web application, i have used one textbox and image button for search
funtion, i have created one user control for this, but after i have entered value in textbox, i have pressed the
button, its not at all working, if i will use mouse i can able to search values, how to enable to enter key at
keydown event of textbox, the following script i have used ,
|
by: rashmidutt |
last post by:
hello sir
i am making project on vb.net language..and project is on hospital management..its major project..and too many fields are present in its data base..i was connecting data base in forms but there is coming error..SIR PLEASE SORT OUT ERROR FROM MY COADING..what can i do to solve this error please give me sugession or if you can send me coading for adding information from form.than i will be thankfull to u..i have written all fields which...
|
by: itsvineeth209 |
last post by:
My task is to create login control without using login control in tools. I shouldnt use sqldatasource or any other. I should use only data sets, data adapters and data readers etc.
U had created table login with fields username(varchar(50)), password(varchar(50)), firstname(varchar(50)), lastname(varchar(50)).
U had to display username , first name, last name in default.aspx page after login.
One more condition is that, if user fails login...
|
by: shapper |
last post by:
Hello,
I am creating a form that includes a few JQuery scripts and TinyMCE
Editor:
http://www.27lamps.com/Beta/Form/Form.html
I am having a few problems with my CSS:
1. Restyling the Select
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |