system("pause");?
Why even bother with that? Not to mention if the system where it's running
on has no executables called pause ...
On Friday, September 2, 2011, addytheboss khandalkar <
[email protected]> wrote:
>
> hey hi,
>
> you can take the help of this code and modify it..
>
> Its made in Dev-C++ and thus not standard linux code.
>
> #include <stdio.h>
>
> int main()
> {
> int x , n , m, y, i ,max;
> int count;
> int arr[100000];
> max = 0;
>
> printf("press 0 to exit\n");
>
> while (1){
>
> scanf("%d%d" , &m, &n);
> i = m;
>
> if (m == 0){
> break;
> }
> while( i<=n ){
> count = 1;
>
> // printf("%d\n", i);
> y = i;
>
> while (y != 1 ){
> if ( y == 1 ){
> break;
> }
>
> if ( y& 1 ){
> y= 3*y+1;
> }else{
> y = y/2;
> }
> count++;
> }
>
>
>
> if (max < count){
> max = count;
> }
>
> i++;
>
> }
>
> printf("%d\n" , max);
> max = 0;
> }
> system("pause");
> }
>
> --
> You received this message because you are subscribed to the Google Groups
"google-codejam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
[email protected] <
google-code%[email protected]>.
> For more options, visit this group at
http://groups.google.com/group/google-code?hl=en.
>
--
Fear of the LORD is the beginning of knowledge (Proverbs 1:7)
--
You received this message because you are subscribed to the Google Groups
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-code?hl=en.