boolean algebra....urgent help needed!

This is a discussion on boolean algebra....urgent help needed! within the C++ Programming forums, part of the General Programming Boards category; i have written a code to output a valid boolean algebra output is the following code correct? Code: #include<iostream.h> #include<conio.h> ...

  1. #1
    C++Pandit
    Join Date
    Jul 2008
    Posts
    49

    Thumbs up boolean algebra....urgent help needed!

    i have written a code to output a valid boolean algebra output
    is the following code correct?

    Code:
    #include<iostream.h>
    #include<conio.h>
    main()
    {
     int a,b,c;
     cout<<"Enter ........."<<endl;
     cin>>a>>b;
    c=a&&b;
    cout<<c;
    getch();
    return 0;
    if the above code is wrong then what would be the correct code and shoud i use other header files?

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    seems right. you could use getchar instead of getch if you want a full ansi program. conio.h and getch aren't ansi.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Urgent Help Needed In Writing Algorithm!!
    By Vikramnb in forum C++ Programming
    Replies: 1
    Last Post: 01-09-2009, 11:46 AM
  2. Looking for a Boolean Algebra site
    By Majin_Flack38 in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-21-2002, 11:03 AM
  3. Replies: 4
    Last Post: 05-03-2002, 09:40 PM
  4. Help Needed: Borland C++ 5.5 Installation - URGENT!
    By Linette in forum C++ Programming
    Replies: 12
    Last Post: 03-09-2002, 05:44 PM

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