need help- logical statement


not going anywhere-

I know it will start something like this, but not sure how to call it: I mean should I put

bool A= ture;
bool B=false;
bool C= --?
please help!
----------------------------------------------------------------------
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream> 
using namespace std;

void main()
{
	int dataValue1;
	int dataValue2;	
	int dataValue3;


			   cout << "Enter first  value= "; 
			   cin >> dataValue1;
			   cout << "Enter second  value= ";
			   cin >> dataValue2;
			   cout<<"Enter third Value= " ;
			   cin>> dataValue3;

			   for(int i=0; i<8; i++){
		for(int j=0; j<8; j++){
			for( int k=0; k<8; k++){
				{
				if ((i &&j) || (j &&k)){//(A and B) or (A and C)
					cout<<" "<<endl;}
				else if ((i&&k) &&(j&&!k)){//(A and C)and(B and !C)
					cout<< " "<<endl;}
				else if ((i|j) &!(j|k)){//(A or B) and !(B or C)
					cout<< " "<<endl;
				}}}}}
			   return ;}


I need to get possible logical combination of the variables A, B, and C, and find which combinations will give a true statement.

Last edited on
why don't you provide some more of your code. Select to start a new thread so you can see how to start and end your code so that others can work with it and use that here.
You can just edit your post, highlight the code and click the <> button on the right side in the Format palette to format code for the forum.

I get that you need to use logical operators, but I'm not sure what the output of the program is supposed to be?
Ah...thank you, wildblue!
Topic archived. No new replies allowed.