+1 Rehman . · April 4, 2015
i want to ask an algo of a problem which is : "Take an array and program it like it should print the smallest number " it should be like linear sort but dont sort it

Post a Reply


- page 2
Oldest  Newest  Rating
0 Rehman . · April 5, 2015
i have editted my Algorithm, at that time net was disconnected bc of electricity loadsheading :p
0 Dol Lod · April 5, 2015
This is close to fine except for a few things.

1) This is not Python. Print statements take parameters. You should be using either printf or cout to print to console. To do this include stdio for printf or iostream for cout. You also must use the namespace for cout. 

2) This is not Java. Arrays do not have lengths have built into them. I know that is annoying, but you actually have to keep track of the size of the array and pass it in as a parameter. 
0 Rehman . · April 6, 2015
Yea leave the syntax please check this logic only, you can put any syntax for print statment
  • 1
  • 2

General Chat


Chat about anything non-computer related including, music, movies, tuna sandwiches, and more!

Bucky Roberts Administrator