Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 12-01-2005, 03:26 PM   #1 (permalink)
 
Banned

Join Date: Jul 2005

Posts: 3

hamzah A.

Default problem in visual c++

how i write this programe

write a program that usesa 10x10 multi-dimension array.
your program should fill this array with random (non-repeatable)
integer numbers between a specified ranges from the user (positive
or negative).then print out the following statistics in report format

:- the mininmum and maximum number for each column & Row

:- how many prime numbers in the matrix

:- how many numbers are dividable by 2 and by 3 respectively.


print out this matrix in different format using print-fun:

1)ordered matrix (ascending & descending).
2)put even numbers in even Row , and odd numbers in odd Rows.
hamzah A. is offline  
Old 12-02-2005, 02:38 AM   #2 (permalink)
 
Ultra Techie

Join Date: Jul 2005

Posts: 530

TheHeadFL

Send a message via AIM to TheHeadFL
Default

sounds like a homework assignment, so you better try to figure most of this out yourself.

as to #2, that is not neccesarily possible, since there may be an uneven distribution of evens and odds, and your entire matrix is filled already.
__________________
Desktop machine: 2 x Opteron 246, Asus K8N-DL, 2GB PC3200 ECC Reg., XFX GeForce 6600GT, 74gb WD Raptor, 2 x 19\" LCDs, Windows XP x64
Server machine: Intel P4 3.0GHz 2MB EM64T, ECS i865pe, 1GB PC3200, 36gb WD Raptor, Windows Server 2003
Laptop: Dell Inspiron 9100 (Intel P4 3.2GHz 1MB Prescott, i865pe, 512MB PC3200, Mobility Radeon 9700, DVD+R/DL Burner), Windows XP
Linux: P3 450Mhz, 386MB ram, Slackware 10.1 (Running mySQL/Apache)
TheHeadFL is offline  
Old 12-03-2005, 01:53 PM   #3 (permalink)
 
Newb Techie

Join Date: Mar 2005

Posts: 39

psyb0rg

Default

does sound like an homework...

well, you can declare a 10x10 array like this

int array[10][10];

you can fill it up using two 'for' loops, one for the rows and one for the columns
psyb0rg is offline  
 
Closed Thread

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