Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1

    Default C Programming using Dev C++


    mga master I have a problem with my Dev C++. Ig pa-RUN na nako sa program then input sa integers ky dili mo display ang output mo out dayon sya.

    mao ni akoang Code:

    #include <stdio.h>

    main()
    {
    int first, second, add, subtract, multiply;
    float divide;
    char hold;

    printf("Enter two integers\n");
    scanf("%d%d", &first, &second);

    add = first + second;
    subtract = first - second;
    multiply = first * second;
    divide = first / (float)second; //typecasting

    printf("Sum = %d\n",add);
    printf("Difference = %d\n",subtract);
    printf("Multiplication = %d\n",multiply);
    printf("Division = %.2f\n",divide);

    getchar();
    return 0;
    }

    Naay kuwang sa code? I search sa internet but get nothing.
    Thanks sa mo Reply! ^_^

  2. #2

    Default Re: C Programming using Dev C++

    maayong adlaw bai...i'm a newbie sa c++ programming..naa lang ko gamay ika suggest i hope makatabang ni nimo...
    add lang ka ug "getch();" before sa imo getchar(); nya add ug header "#include <conio.h>.
    ur using turbo c style of coding man gud

  3. #3

    Default Re: C Programming using Dev C++

    mao jud ni ako ghagbongan.

  4. #4

    Default Re: C Programming using Dev C++

    Quote Originally Posted by KUGMO View Post
    maayong adlaw bai...i'm a newbie sa c++ programming..naa lang ko gamay ika suggest i hope makatabang ni nimo...
    add lang ka ug "getch();" before sa imo getchar(); nya add ug header "#include <conio.h>.
    ur using turbo c style of coding man gud
    Suwayi sa ang getch() matod ni kugmo, kung lahi ang pag-basa sa imung compiler ang getch(), suway ning link sa ubos..

    replacement of getch() | DaniWeb

  5. #5

    Default Re: C Programming using Dev C++

    edit: same man diay ni kugmo. haha peace brad wala ko ga read

    getch(); rana sya TS not necessarily nga getchar(); hihi
    ive tried this pud.


    #include <stdio.h>
    #include <conio.h>

    main()
    {
    int first, second, add, subtract, multiply;
    float divide;
    char hold;

    printf("Enter two integers\n");
    scanf("%d%d", &first, &second);

    add = first + second;
    subtract = first - second;
    multiply = first * second;
    divide = first / (float)second;

    printf("Sum = %d\n",add);
    printf("Difference = %d\n",subtract);
    printf("Multiplication = %d\n",multiply);
    printf("Division = %.2f\n",divide);

    getch();
    return 0;
    }

  6. #6

    Default Re: C Programming using Dev C++

    Salamat mga Master! ^_^
    getch(); works!
    Yehee...!

  7. #7

    Default Re: C Programming using Dev C++

    @DoItLikeADude chickx nga programmer astig

    pa tudlo ko be libre snaks

  8. #8

    Default Re: C Programming using Dev C++

    Quote Originally Posted by jdbebz View Post
    @DoItLikeADude chickx nga programmer astig

    pa tudlo ko be libre snaks
    hahaha unsaon. newbie pa ni

  9. #9

    Default Re: C Programming using Dev C++

    pwede patudlo nimo ug proramming ma'am?

  10. #10

    Default Re: C Programming using Dev C++

    pwd ra mana imo code wla getch, try lang ctrl+f5 eg pa run...

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. how to edit this program using MPLAB IDE
    By arjea2490 in forum Programming
    Replies: 2
    Last Post: 05-17-2011, 07:25 AM
  2. Bisag unsan na program using web based
    By melay24 in forum Programming
    Replies: 9
    Last Post: 09-15-2010, 10:42 PM
  3. Replies: 7
    Last Post: 11-02-2009, 05:12 PM
  4. simple PING program using batch file
    By anggwaponi in forum Programming
    Replies: 12
    Last Post: 08-20-2009, 04:29 AM
  5. Replies: 1
    Last Post: 10-16-2005, 08:17 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top