473,395 Members | 1,458 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,395 software developers and data experts.

Save numbers to different file depending on size

how can i use bit i have a programe user input 10 numbers in pairs if number is
greater than 50 itwill save in char file
if it is less than 50 than it will save in int file
Sep 11 '07 #1
2 1209
pbmods
5,821 Expert 4TB
Heya, AAbdul. Welcome to TSDN!

I'm going to go ahead and move this thread to the C forum, where our resident Experts will be better able to help you out.
Sep 11 '07 #2
sicarie
4,677 Expert Mod 4TB
how can i use bit i have a programe user input 10 numbers in pairs if number is
greater than 50 itwill save in char file
if it is less than 50 than it will save in int file
Well, you haven't specified how you are reading them in (console/cin, getline, etc...), but it sounds like all you need is two filehandles (one for each output file), and a conditional statement.

Do you have an algorithm created for this yet?
Sep 11 '07 #3

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

Similar topics

2
by: Olaf Baeyens | last post by:
I want to convert one bitmap file to another one. For example load as bmp and save as jpg. The loading part is simple I do this: Stream BitmapStream =...
4
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. ...
5
by: Patrick | last post by:
Following on from the excellent example at http://www.c-sharpcorner.com/Code/2003/Sept/ExportASPNetDataGridToExcel.asp on how to save a data-grid to excel file, how can I extend the example such...
19
by: youpak2000 | last post by:
Are MAGIC numbers always bad? Using magic numbers (constant numbers) in programs are generally considered a bad programming practice, and it's recommended that to define constants in single,...
9
by: serge | last post by:
/* Subject: How to build a procedure that returns different numbers of columns as a result based on a parameter. You can copy/paste this whole post in SQL Query Analyzer or Management Studio...
5
by: ^cypis^ vel. SQ9JTI | last post by:
Hi there, i have a problem. I prepared bucket sorting with reading values from file (data.txt) and saving to other file (aus.txt). Everything is good if we talk about reading and sorting, but...
25
by: Subra | last post by:
Hi, What is the best way to find the 1000 largest numbers from the file having hell lot of entries ? Can you please help me to find out the way ? Do I need to go for B+ trees ?? Please help,...
1
by: Shyam Barnwal | last post by:
Hi sir, Good afternoon, I am working on winamp general purpose pluggin "gen_whatsplaying " project downloaded from the site www.schaffrath.net I compiled and build the project successfully...
8
by: why? | last post by:
Im working with Python 2.2 on my red hat linux system. Is there any way to write python codes in separate files and save them so that i can view/edit them in the future? Actually I've just started...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.