Search:

Type: Posts; User: neeha_khan

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    3,385

    The Problem statement asks us to compute cycle...

    The Problem statement asks us to compute cycle length of EVERY number between two input numbers. Hence, two inputs.



    The program compiles perfectly my end and at the judge's end(website) with...
  2. Replies
    20
    Views
    3,385

    Yes I have rewritten the program with proper...

    Yes I have rewritten the program with proper functions, without VLA, which is not posted here now. Thanks.
  3. Replies
    20
    Views
    3,385

    I have found the error. The mistake is definitely...

    I have found the error. The mistake is definitely not a compilation or presentation error, as I had mentioned before, There probably is some input for which I may not be getting the right output..
    ...
  4. Replies
    20
    Views
    3,385

    I made some modifications and wrote this now: ...

    I made some modifications and wrote this now:




    //110101 The 3n + 1 Problem
    # include <iostream>
    # include <fstream>
    using namespace std;
    int main()
  5. Replies
    20
    Views
    3,385

    The above program is only for 1 set of input. ...

    The above program is only for 1 set of input.

    The catch is here... "The input will consist of a series of pairs of integers i and j, one pair of integers per line."
    But now how do I know when to...
  6. Replies
    20
    Views
    3,385

    Here it is: //110101 The 3n + 1 Problem #...

    Here it is:


    //110101 The 3n + 1 Problem
    # include <iostream>
    using namespace std;
    int main()
    {
    int i,j,k,x,n1,n,m=909,maxcount; //x=index of counter, n=no fo elements in counter,...
  7. Replies
    20
    Views
    3,385

    Yes it does. And there is a separate section/...

    Yes it does. And there is a separate section/ count for "presentation errors" on their site, which is 0.

    There probably is some input for which I may not be getting the right output, just maybe..
  8. Replies
    20
    Views
    3,385

    Thanks, but I already tried the single-run...

    Thanks, but I already tried the single-run program. Didn't work :(
  9. Replies
    20
    Views
    3,385

    @laserlight...

    @laserlight
    The site provides for a separate section/ count for compilation errors. There are 0 compilation errors.

    @killme
    Yes I am sorry I haven't presented a neat code here. And regarding...
  10. Replies
    20
    Views
    3,385

    Can you find the error?

    This is the Problem Statement:
    The 3n + 1 Problem
    Consider the following algorithm to generate a sequence of numbers. Start with an integer n. If
    n is even, divide by 2. If n is odd, multiply by...
Results 1 to 10 of 10