Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 11-21-2003, 07:00 PM   #1 (permalink)
Jarumajoo
Registered User
 
Join Date: Nov 2003
Posts: 1
Jarumajoo is on a distinguished road
Talking Help :: Loops & Arrays

I've been experimenting around on C programing stuff with Microsoft Visual Basic C++ 6.0 for a few weeks now,

I was wondering if someone could help me with writting a program that "reads in buncha numbers into an array, use a FOR LOOP to find the largest number, after that print out the value of the largest number & the index/position of the number & the total number of figures stored in the array"
Jarumajoo is offline   Reply With Quote
Old 11-21-2003, 10:30 PM   #2 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
i dunno about others, but i'm not going to do your homework for you.

however, if you post some code and ask questions about why things don't work the way you expect them to, we might be able to help you.
joe_bruin is offline   Reply With Quote
Old 11-24-2003, 12:36 AM   #3 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,694
redhead is on a distinguished road
Since it's your homework, I won't do it..
But I'll give you some pseudo code..
Code:
Open file
while (file not empty)
  read from file
  counter increased
close file
while (counter not nill)
  take current number
  compare to next number
  if (next greater)
     hold next number as comparison
print what you holding variable contains
Or you might want to look at STL.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 12-01-2003, 08:48 PM   #4 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
Are you guys sure it is his homework?
__________________
Valmont is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
combining arrays Engineer Standard C, C++ 11 03-12-2005 10:23 AM
Dynamic Arrays, the 'right' way. Mr.Anderson Standard C, C++ 10 10-05-2004 06:00 AM
sorting objects arrays by object properties sde Java 28 08-05-2004 05:51 AM
submitting arrays sde PHP 4 09-10-2002 05:08 PM


All times are GMT -8. The time now is 05:39 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting