Search:

Type: Posts; User: abhishekcoder

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. @Stahta, I haven't started from scratch: 1....

    @Stahta,

    I haven't started from scratch:

    1. This is another problem, the previous one in the thread "Erroneous answer in algorithm problem" is solved, thanks to you.
    2. I earlier incorporated...
  2. Erroneous answer in greatest divisor algorithm

    Hi All,

    I am writing a program to find the number between 1 and 100 that has the greatest number of distinct divisors. Below is my code for the same. It is returning an erroneous answer, i.e. 8...
  3. Replies
    6
    Views
    2,829

    Hi Stahta, My program gives the following...

    Hi Stahta,

    My program gives the following results to me:

    the smallest positive integer with 1 distinct divisors is 1
    the smallest positive integer with 2 distinct divisors is 2
    the smallest...
  4. Replies
    6
    Views
    2,829

    Hi Stahta, Resetting count solves my problem....

    Hi Stahta,

    Resetting count solves my problem. Thank you.
  5. Replies
    6
    Views
    2,829

    Erroneous answer in algorithm problem

    Hi All,

    I am writing a program to find the smallest positive integer that has n or more divisors. My program gives me correct answer for input values upto 4 but it produces erroneous answers for...
  6. Thanks.

    Thanks.
  7. Replies
    3
    Views
    4,126

    Thank you for your reply. Problem solved.

    Thank you for your reply. Problem solved.
  8. Replies
    3
    Views
    4,126

    Errors in smallest divisor program

    Dear All,


    I have written a program to find the smallest divisor of an input number. The code gives me an error in lines 19 and 23. The error is invalid operands to binary %. Please help me...
  9. Thank you for your prompt reply. Solves my...

    Thank you for your prompt reply. Solves my problem, apologize for the trivial question, my IDE dev c was running fine with %f so that is why I couldn't detect the problem earlier.
  10. Erroneous answer in reciprocal number algorithm

    Hi all,

    I have written a program to find the reciprocal of an input number by using newton rhapson iterative method. Below is the algorithm implementation in C:



    #include<stdio.h>...
  11. Replies
    13
    Views
    4,175

    Thanks :)

    Thanks :)
  12. Replies
    13
    Views
    4,175

    :). I would like to read book that enables me to...

    :). I would like to read book that enables me to think algorithms...any suggestions?
  13. Replies
    13
    Views
    4,175

    Hi Zuk, Thank you for your reply. The problem...

    Hi Zuk,

    Thank you for your reply. The problem is solved with your edits...except for one minor edit, instead of m*m<input, there should be m*m>input, then the algorithm gives proper results.
    ...
  14. Replies
    13
    Views
    4,175

    Below is my code...I am encountering an...

    Below is my code...I am encountering an unexpected error. My code doesn't give any output after I enter 9 as input.



    /*program finds an integer whose square is closest to but greater than the...
  15. Replies
    13
    Views
    4,175

    Thanks for your reply. The input is 9, the...

    Thanks for your reply. The input is 9, the expected output is 4 and the incorrect output is 3.
  16. Replies
    13
    Views
    4,175

    Erroneous answer in algorithm problem

    Dear All,

    I have written a program that finds the integer whose square is closest to but greater than the integer number input as data. But it is giving me an erroneous answer. My algorithm is:
    ...
  17. Thanks...solved my problem.

    Thanks...solved my problem.
  18. Incorporated the changes that you...

    Incorporated the changes that you mentioned....program still returning the wrong values...got 2.5 as the square root of 5...
  19. Erroroneous output in calculating the square root of a number

    Dear All,

    I have written a program to calculate the square root of an input number. It gives me an erroneous answer,for example, when I input the number 5, I get an answer 2.5 whereas I should get...
  20. Thank you for your detailed reply. I am sorry...

    Thank you for your detailed reply.

    I am sorry for that obvious error, I meant if a user enters an ASCII decimal input he gets an ASCII character output.





    12 1 2 3 4 5 6 7 8 9 8 7 6
  21. The question is: Write a program to convert a...

    The question is:

    Write a program to convert a decimal representation for a number to the corresponding character string representation.

    I am using scanf %d representation to input decimal...
  22. @Salem: Now my code works, but is producing the...

    @Salem: Now my code works, but is producing the wrong output.
    For example if I enter the input sequence length as 4 and input 1,9,.,8 one by one, my code gives me output as 1999 whereas It should...
  23. Thank you for your reply. The program still stops...

    Thank you for your reply. The program still stops at the same point on changing nchar to ndec.
  24. Conversion problem not working properly

    Hi All,

    I have written a program to input a decimal string and convert it to character string. Below is my program:



    /*this program converts the decimal representation of an input string to...
  25. I want to convert my input decimal to BCD, 0001...

    I want to convert my input decimal to BCD, 0001 0010 is bcd of 12.
Results 1 to 25 of 69
Page 1 of 3 1 2 3