General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 3rd, 2012, 03:06 AM
janes21 janes21 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2012
Posts: 1 janes21 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 15 m 19 sec
Reputation Power: 0
Pep/8 need help !!

I been trying to do this problem in pep/8 it was an assignment i couldnt finish at time, but i will like to see it done can someone can help me!!

;specify a structure called Fraction with num and denom as its integer members.
;Keep asking the user if he or she wants to add a fraction. If the answer is 'y' or 'Y',
;allocate memory dynamically for a Fraction structure, read a fraction entered as numerator,
;space, /, space, denominator and store the pointer returned by new in a locally defined array of pointers.
;When the user is done entering fractions, display the fractions in reverse order using the pointers
;that were stored in the array.
;Then, read a Fraction, storing it in a Fraction variable local to main and search for it in the above array of pointers.
; Print the index where it was found or "Not found" otherwise.
;The following shows a sample execution of the program:
;Input: 2 / 3 1 / 2 1 / 4 1 / 3 2 / 5 -99
;Output: 2 / 5 1 / 3 1 / 4 1 / 2 2 / 3
;Enter fraction to search for: 1/3
;1/3 was found at index 3.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Pep/8 need help !!


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap