Search:

Type: Posts; User: duffmckagan

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,537

    Still not sure what that means! Well, this...

    Still not sure what that means!

    Well, this was an assignment problem and I blew my brains out pondering over this thing.

    Please explain how I don't have control when the assignment happens....
  2. Replies
    6
    Views
    1,537

    Howz this equality operator working?

    #include<stdio.h>
    main()
    {
    int k=35;
    printf ("%d %d %d", k==35, k=50, k>25);

    }
  3. Replies
    19
    Views
    3,093

    Thanks some awesome information... Thanks to...

    Thanks some awesome information...

    Thanks to all of you who replied here. :)
  4. Replies
    19
    Views
    3,093

    Msvc 6

    Msvc 6
  5. Replies
    19
    Views
    3,093

    @Salem Thanks for pointing it out. I had read...

    @Salem
    Thanks for pointing it out.
    I had read somewhere that %lf is the format specifier for double!
    Now I verified whether that was correct.
    I understand now that the format specifier for...
  6. Replies
    19
    Views
    3,093

    I am learning and haven't yet dealt with...

    I am learning and haven't yet dealt with arrays..so I have to make the program without arrays for the time being.

    @ssharish2005

    Thanks for pointing it out. (Logic is incorrect)
    I think I...
  7. Replies
    19
    Views
    3,093

    Okay..so do you mean that changing it to double...

    Okay..so do you mean that changing it to double will help?

    Also give some more inputs on using the sqrt function.
  8. Replies
    19
    Views
    3,093

    Trouble with sqrt ()

    Here's a simple program that is to be used for calculating Sum, Average and Standard Deviation.

    But it doesn't work. There's a problem with the sqrt function. I hear it returns a double value....
  9. Write a general-purpose function to...

    [/quote]
    Write a general-purpose function to convert any given year into its roman equivalent.
    The following table shows the roman equivalents of decimal numbers:

    Decimal:.........Roman...
  10. Convert to Roman Numerals - Program not working, suggest a workaround!

    /*
    Write a general-purpose function to convert any given year into its roman equivalent.
    The following table shows the roman equivalents of decimal numbers:

    Decimal:.........Roman...
  11. Hehe..that was a silly mistake!! I don't know...

    Hehe..that was a silly mistake!!

    I don't know how I did not notice that! :P
  12. Calculation of Factorial using Functions.

    The following program gives the wrong output.



    #include<stdio.h>
    main()
    {
    int i, f;
    int factorial();
  13. Replies
    17
    Views
    45,057

    Here's something that worked.. Idea based on...

    Here's something that worked..

    Idea based on that of fgw_three



    for (number=2;number<=300;number++)
    {

    for (div=2; div<number; div++)
  14. Replies
    17
    Views
    45,057

    @fgw_three Your program doesn't display the...

    @fgw_three

    Your program doesn't display the number 3...

    I guess if(i==number) is mandatory then..
  15. Replies
    17
    Views
    45,057

    I have tried to do the same thing man... ...

    I have tried to do the same thing man...




    for (number=1; number<=300; number++)
    {
    for (i=2; i<=number; i++)
    {
    if (i==number)
  16. Replies
    17
    Views
    45,057

    Okay..this is my new program..as lousy as it...

    Okay..this is my new program..as lousy as it is..but it works!!!




    #include<stdio.h>
    main()
    {
    int number, i;
  17. Replies
    17
    Views
    45,057

    I at least took care of the duplicates..but...

    I at least took care of the duplicates..but there's one more problem!

    Every number divisible by 5 is also there in the list!

    Also, how do I take care of the number 2?
    It is also not there on...
  18. Replies
    7
    Views
    11,888

    Actually I was trying to figure out the logic......

    Actually I was trying to figure out the logic...

    How do we make the computer win?
    How do we know what move to make..how many matchsticks the computer should pick up..in case the user enters n...
  19. Replies
    7
    Views
    11,888

    The program is incomplete man.. I was just...

    The program is incomplete man..

    I was just trying to figure it out..and then I posted it here...

    I will edit that part though..
  20. Thanks for bringing me back on track..got it now...

    Thanks for bringing me back on track..got it now :)

    Done a few changes...with the factorial thing...



    result=0;

    for (num=1; num<=7; num++)
    {
  21. Replies
    17
    Views
    45,057

    Printing Prime Numbers from 1 to 300.

    #include<stdio.h>
    main()
    {
    int number, i;

    for (number=2;number<=300;number++)
    {
    for (i=2; i < number ; i++)
    {
    if (number%i==0)
  22. Replies
    7
    Views
    11,888

    Matchstick game

    Can anybody gimme an idea as to how this can be done..?

    Write a program for a matchstick game being played between the computer and a user.
    Your program should ensure that the computer always...
  23. Whats wrong with this program - Output of a series

    /*
    Write a program to add first seven terms of the following series using a for loop:

    (1/1!) + (2/2!) + (3/3!) + .....


    */


    #include<stdio.h>
  24. Replies
    6
    Views
    24,622

    But still... number%10 --- should extract...

    But still...


    number%10 --- should extract the last number
    and
    number%100 -- should have extracted the first number (of a three digit number), isn't it?
  25. Replies
    6
    Views
    24,622

    Worked :) I changed the digit extraction...

    Worked :)

    I changed the digit extraction scheme to this:



    digit1 = number - ((number / 10) * 10);
    digit2 = (number / 10) - ((number / 100) * 10);
    digit3 = (number / 100) - ((number /...
Results 1 to 25 of 47
Page 1 of 2 1 2