hello guys, i need your help at this exercise:
i have to write a program which reads random N numbers from the file clocktest.dat (i did it in the previous exercise) and put them at a table. At the table it will use bubble short for the numbers. Also, it have to counts the time of the bubble short ( sorry for the bad english guys)
i solve this but it doesn't run. Can you help me?
You can edit your post and change it yourself. There's a small window icon with a pencil on it next to your name on the top of your post. Click on it and you'll be able to modify the post.
Also, put your code between [code] and [/code] tags. This will make it look like this:
1 2 3 4
int main()
{
return 0;
}
Are you sure you want to count the time in seconds?
How big is N? My guess is that this way you'll always get 0 seconds.
Maybe you want to count the number of comparisons or something...