CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Jun 2009
    Posts
    4

    C++ assignment for the gurus only . Solve this if u can .

    i need some nice guru to solve this soon. am aving problem with my VB ,
    #include<stdio.h>
    main()
    äint a,b;
    a=5;
    b=2;
    printf("%d",a*b);
    printf("%d",a+b);
    printf("%d",-b);
    printf("%d",a/b);
    printf("%d",a-b);
    printf("%d",a%b);
    return 0;
    ñ

    . i cant compile it,
    am getting error message.
    i need the answer. pls

  2. #2
    Join Date
    Sep 2005
    Posts
    204

    Re: C++ assignment for the gurus only . Solve this if u can .

    Try

    Code:
    int main()
    {
        int a=5, b=2;
    
        printf("%d\n",a*b);
        printf("%d\n",a+b);
        printf("%d\n",-b);
        printf("%d\n",a/b);
        printf("%d\n",a-b);
        printf("%d\n",a%b);
    
        return 0;
    }

    8)

  3. #3
    Join Date
    Jun 2009
    Posts
    4

    Re: C++ assignment for the gurus only . Solve this if u can .

    Pls I need the solution . I can't even download a compiler now , av a poor internet connection , pls some should solve THIS for me .

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    11,609

    Re: C++ assignment for the gurus only . Solve this if u can .

    Quote Originally Posted by zoba View Post
    Pls I need the solution . I can't even download a compiler now , av a poor internet connection , pls some should solve THIS for me .
    Which is it? You're getting error messages or you don't have a compiler?

  5. #5
    cilu's Avatar
    cilu is offline Moderator/Reviewer/MS MVP Power Poster
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,349

    Re: C++ assignment for the gurus only . Solve this if u can .

    am aving problem with my VB
    Besides that should be C/C++ not VB, I think you have equal problems with your keyboard.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  6. #6
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: C++ assignment for the gurus only . Solve this if u can .

    Which is it? You're getting error messages or you don't have a compiler?
    Error : Compiler not found.

  7. #7
    Join Date
    Jun 2007
    Posts
    90

    Re: C++ assignment for the gurus only . Solve this if u can .

    hi,

    There are some special characters in the program because of which it is not compiling.Anyways,answer for your question would be as following...

    10
    7
    -2
    2
    3
    1


    Thanks

  8. #8
    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    379

    Re: C++ assignment for the gurus only . Solve this if u can .

    or maybe 107-2231

  9. #9
    Join Date
    Sep 2005
    Posts
    204

    Talking Re: C++ assignment for the gurus only . Solve this if u can .

    Quote Originally Posted by Skizmo View Post
    Error : Compiler not found.
    lol, good one....

  10. #10
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    11,609

    Re: C++ assignment for the gurus only . Solve this if u can .

    Quote Originally Posted by rag84dec View Post
    hi,

    There are some special characters in the program because of which it is not compiling.Anyways,answer for your question would be as following...
    Perhaps you didn't notice the rest of us deliberately not doing this guy's homework for him.

  11. #11
    Join Date
    Oct 2006
    Posts
    15

    Talking Re: C++ assignment for the gurus only . Solve this if u can .

    Come on, all you Gurus out there, the challenge is on, I was going to try to help, but he wants Gurus only for such a complicated problem, and I aint a guru..... yet.
    ...Don't be afraid, only believe.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



HTML5 Development Center

Click Here to Expand Forum to Full Width