float Particles;
float MomentumOfParticles;
int MassOfparticle;
float VelocityOfparticles;
int i;
int randomPick = 0;
void setup() {
Serial.begin(9600);
randomSeed(analogRead(A0)); //make random numer A0 pin is not connected
float particles[] = {1.0,1.5,2,2.5,3,3.5,4,4.5,6,6.5,7,7.5 ,8,8.5,9,9.5,10.0};
float VelocityOfparticles[i] = {1,2,3,4,5,6,7,8,9,10};
float MassOfparticle[i] = {1,2,3,4,5,6,7,8,9,10};
float MomentumOfParticles[MassOfparticle];
for (int i = 0; i < 10; i++) {
float MassOfparticle[10] = {1,2,3,4,5,6,7,8,9,10};
randomPick = randomNub[random(0,10)];
}
for (int i = 0; i < 10; i++) {
float VelocityOfparticles[10] = {1,2,3,4,5,6,7,8,9,10};
randomPick = randomNub[random(0,10)];
}
Serial.println("Particle Momentum; ");
for (int i = 0; i < MomentumOfParticles; i++) {
momentumOfparticles[i] = MassOfparticle * VelocityOfparticles[i];
Serial.println(MomentumOfParticles[i]);
}
}
void loop() {
// put your main code here, to run repeatedly:
}
hw1.2.ino (1018 Bytes)