473,385 Members | 2,028 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,385 software developers and data experts.

Help writing/reading character-base files, Bowler's score

I dont know anything about bowling.I have to write four functions findpattern, countrange, validset and classify.
findpattern will receive three scores
countranges will receive the three scores exatly 300, 200-299 range, 100-199 range, 0-99 range.
validset receive the three scores less thean zero or over 300 is invalid, the function will return 1 if three numbers are in the range from 0 to 300 and zero if else.
classify will receive three numunbers. This function will call the first two functions to classify the three numbers example;
the 3 values are: -60 30 360
-60 is invalid
360 is invalid
the group is invalid
Nov 13 '06 #1
0 1121

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

Similar topics

1
by: Christopher Reeve | last post by:
Hi, I wonder if anyone could help me. I am moving accross from C to C++ and am writing a program that reads and writes data into a file. I am aware of the old C ways of doing it but am trying to...
5
by: da Vinci | last post by:
Hello, I have a question regarding how to format input. I am at the beginners level. Basically, I am reading in a single character from the keyboard using cin and I want to ensure that it is...
31
by: da Vinci | last post by:
OK, this has got to be a simple one and yet I cannot find the answer in my textbook. How can I get a simple pause after an output line, that simply waits for any key to be pressed to move on? ...
5
by: zambak | last post by:
Hi I have assignment for some wierd compression alghoritam that will read in from a file convert characters to 5 bit codes and then write out compressed version of the original file. For...
14
by: Nick Z. | last post by:
I have a file that I want to read a UTF-16 unicode string from. What is the easiest way to accomplish that? Thanks in advance, Nick Z.
7
by: none | last post by:
Hello, I was reading some of the FAQ last night and got to this one, http://c-faq.com/ptrs/genericpp.html . Now i'd just like to make sure i'm understanding it correctly, so please correct me where...
12
by: manstey | last post by:
I am writing a program to translate a list of ascii letters into a different language that requires unicode encoding. This is what I have done so far: 1. I have # -*- coding: UTF-8 -*- as my...
2
by: shblack | last post by:
I need help with a program I am writing for school. The program has to do the following: /* 1. Character string must be a minimium of 15 charactors. 2. If not 15 characters long it must give...
3
by: sam_cit | last post by:
Hi Everyone, I have a buffer having some raw ASCII data and i want to write it into a file. One way is to loop through the buffer and write a single character at a time and close the file after...
7
by: tshad | last post by:
I have a program in 2005 that is reading a text file removing text and then writing it back out again. It removes lines that start with PRINT. This program has worked fine for months. Now all...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
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,...

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.