It's <cstdlib> BTW.
I'm sure if the OP turns that in (assuming it's homework) the teacher would be suitably impressed . . .
It's <cstdlib> BTW.
I'm sure if the OP turns that in (assuming it's homework) the teacher would be suitably impressed . . .
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
Either works.It's <cstdlib> BTW.
That's why I posted it. I like impressing teachers who aren't my teachers but end up getting my code for assignments anyway.I'm sure if the OP turns that in (assuming it's homework) the teacher would be suitably impressed . . .
its not homework lol just been watching a few c++ video and it says to try do this could it also be done like this ?
#include <iostream>
int main(){
//intilize my array with 10 values
int my array[10];
//Random value to array
1[0] = 5;
2[1] =10;
//so on so on
//how would I loop this ?