Last change
on this file since 144 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
|
Rev | Line | |
---|
[2] | 1 | #include <iostream>
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 | int 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 |
|
---|
| 17 | int main(){
|
---|
| 18 | int rick = 1022;
|
---|
| 19 | cout << Keer3plus1(&rick) << endl;
|
---|
| 20 | rick = 11111;
|
---|
| 21 | cout << Keer3plus1(&rick) << endl;
|
---|
| 22 | rick = 22222;
|
---|
| 23 | cout << Keer3plus1(&rick) << endl;
|
---|
| 24 | rick = 33333;
|
---|
| 25 | cout << Keer3plus1(&rick) << endl;
|
---|
| 26 | rick = 44444;
|
---|
| 27 | cout << Keer3plus1(&rick) << endl;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.