help help

This is a discussion on help help within the C++ Programming forums, part of the General Programming Boards category; in my code how do i fix the error #include <stdio.h> #include <iostream.h> #include <stdlib.h> int main(int argc, char *argv[]) ...

  1. #1
    Registered User mill1000's Avatar
    Join Date
    Nov 2001
    Posts
    45

    Unhappy help help

    in my code how do i fix the error

    #include <stdio.h>
    #include <iostream.h>
    #include <stdlib.h>
    int main(int argc, char *argv[])
    {
    float num1;
    float num2;
    float num3;
    float num4;
    cout<<"Enter first number:";
    cin>>num1;
    cout<<"Enter second number:";
    cin>>num2;
    cout<<"Enter third number:";
    cin>>num3;
    cout<<"Enter forth number:";
    cin>>num4;
    if (num1>num2);
    {
    cout<<""<<num2;
    }
    else;
    {
    cout<<""<<num1;
    if (num2>num3)
    {
    cout<<""<<num1, cout<<""<<num3;
    }
    system("pause");
    return 0;
    }

  2. #2
    I'm Back
    Join Date
    Dec 2001
    Posts
    556
    1. remove ; after if/else statements
    2. chk the } brackets placing

    also next time try to be a little more specific regarding what errors you have.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21