| | |
Array in talbe (problem)
![]() |
•
•
Join Date: Jul 2004
Posts: 65
Reputation:
Solved Threads: 0
here is the question:
Use a two-dimensional array called price to hold the prices for Proton’s car
regarding to the models and CC as listed below.
--------------------------------------------------------------------------
in 2d array..i could get
(for example)
void disp(a[][3]);
int main()
{
num[3][2] = { {1,2},{4,5},{7,8} }
disp(num);
return 0;
}
void disp(a[][3])
{
for (int i=1; i<=3 ; i++)
for (int i=1; i<=2 ; i++)
cout << a[i][j] << endl;
}
--------------------------------------------------------------------------
my question is:
how do i seperate the i and j so i could form like a table..
something like this:
model price
i j
i+1 j+1
i+2 j+2
.....and so on..
instead of
1 2
4 5
7 8
All i want is to spread i and j wide....
p.s Get what i mean??
Use a two-dimensional array called price to hold the prices for Proton’s car
regarding to the models and CC as listed below.
--------------------------------------------------------------------------
in 2d array..i could get
(for example)
void disp(a[][3]);
int main()
{
num[3][2] = { {1,2},{4,5},{7,8} }
disp(num);
return 0;
}
void disp(a[][3])
{
for (int i=1; i<=3 ; i++)
for (int i=1; i<=2 ; i++)
cout << a[i][j] << endl;
}
--------------------------------------------------------------------------
my question is:
how do i seperate the i and j so i could form like a table..
something like this:
model price
i j
i+1 j+1
i+2 j+2
.....and so on..
instead of
1 2
4 5
7 8
All i want is to spread i and j wide....
p.s Get what i mean??
![]() |
Similar Threads
- array/funtion problem, please help (C++)
- 2D array allocation problem (C)
- Array Index Problem in Quick Sort (C#)
- Help - Problem with array (C)
- Is there a simplest way to work this array problem? (C++)
- i have problem with array plz help (Java)
- Large Array Problem (PHP)
Other Threads in the C Forum
- Previous Thread: Visual Studio 6.0.. Frozen In Time
- Next Thread: Decimal Problem In C
| Thread Tools | Search this Thread |
#include * adobe ansi api array asterisks binarysearch centimeter changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc csyntax database directory dynamic execv feet fgets file fork function getlasterror getlogicaldrivestrin givemetehcodez global grade gtkgcurlcompiling gtkwinlinux hacking hardware highest histogram ide include incrementoperators infiniteloop input interest kernel keyboard kilometer license linked linkedlist linux linuxsegmentationfault list locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft motherboard mqqueue number odf opendocumentformat opensource owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing segmentationfault sequential single socket socketprograming standard string systemcall threads turboc unix user voidmain() wab whythiscodecausesegmentationfault windows.h windowsapi





