HELP !

Write your question here.

Write a program to determine how 4 fours can be arranged in expressions that
evaluate to a given value using simple arithmetic, where:
1. the standard rules of operator precedence shall be applied, i.e., multiplication
and division before addition and subtraction, evaluated from left to right, and

2. operators shall, and only, appear between the fours (total of 3).

is this even right HELP Pls!!

include <cmath>
#include <iostream>
using namespace std;

int main ()
{
int x;

x = 2;
cout<<x<<"=";
do
{
cout<<" 4 +";
x=x-4;
}while (x>3);

do
{
cout <<x<<"/4";
break;
} while (x<4);
}
Topic archived. No new replies allowed.