473,395 Members | 1,442 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,395 software developers and data experts.

storing results into an 2D array

Hi,

i have created a program that displays a few x-axis and few y-axis positions of a ball that is thown into the air.
the user has input angle and velocity.

Iam stuck on how to enter these results into a 2D array.

here is the part of the program wihich is collecting the results and (trying) to put in the 2 dimensional array to display and then to plot a graph.
can anyone point me in the right direction. iam stuck.

thanks heaps,


for (int j=0; j<=6; j++)
{
v = vsinx - (grav * timeint);
timeint1 = timeint + 1;
timeint = timeint1;

s2 = sy + (v * timeint);
sx2 = vcosx * timeint;
sx = sx2;


for (int b = 0; b <= sy; b++)
for (int c = 0; c <= sx; c++)

for (int d = 0; graph[b][c]; d++) \\trying to store into graph[b][c] sx=xangle
cout << graph[b][c];





cout << BLANK;
cout << STAR << "\n";






}
}
May 3 '07 #1
2 1431
JosAH
11,448 Expert 8TB
You don't need a two dimensional array; you need just two one dimensional
arrays, one for the x coordinate and one for the y coordinate; x[t] and y[t]
represent the coordinates of the ball at 'time' (or 'step') t.

kind regards,

Jos
May 3 '07 #2
hi,

how would i store the result in the 1 dimensional array?
May 3 '07 #3

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

Similar topics

5
by: netcoder77 | last post by:
Has anyone tried this in VB .NET or via VBScript? Can it be done? How do we handle retrieving a binary data format (the photo) using ADSI or VB .NET? All my searching on the net yielded no useful...
6
by: Steve | last post by:
Hi, I've developed a testing application that stores formatted results in a database. Recently it was requested that I add the ability to generate graphs from the raw, un formatted test results...
22
by: guitarromantic | last post by:
Hey everyone, I run a site with staff-submitted reviews, and most of them are written by one author. However, we also do "multiple" reviews. Up until now I just had a userid for a 'Multiple'...
2
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.