source: liacs/pm/test.cc@ 123

Last change on this file since 123 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

  • Property svn:executable set to *
File size: 497 bytes
RevLine 
[2]1#include <iostream>
2
3
4int Keer3plus1(int * Getal){
5 int duizend = 0;
6 for (int i = 1; i < 10; i++){
7 if (*Getal / (i * 10000)) {
8 duizend = i;
9 }
10 else if (duizend != 0) {
11 return(duizend);
12 }
13 }
14 return 0;
15}
16
17int main(){
18int rick = 1022;
19cout << Keer3plus1(&rick) << endl;
20rick = 11111;
21cout << Keer3plus1(&rick) << endl;
22rick = 22222;
23cout << Keer3plus1(&rick) << endl;
24rick = 33333;
25cout << Keer3plus1(&rick) << endl;
26rick = 44444;
27cout << Keer3plus1(&rick) << endl;
28}
29
Note: See TracBrowser for help on using the repository browser.