#include <iostream>
usingnamespace std;
int main() {
//input output
cout << "please input a number" <<endl;
int inputtedNumber;
cin>> inputtedNumber;
cout << "The prime number between 3 and that number are:" << endl;
int candidate = inputtedNumber; // temporary
//eventually going to put outer loop
// all numbers between 3 and the inputted numbers
//this code here tests if canidates is prime
//loop between the 3 and inputted
// to see if they divide evenly.
//for looop here betweeen 3 and a canidate
int i;
bool prime = true;
for (i = 2; i < candidate; i++) {
cout << candidate << "%" << i << "is";
cout << candidate %i << endl;
cout << "PRIME IS " << ((prime)?"true" : "false") <<endl;
if (0 !=candidate%i )
prime = true;
else
prime = false;
if (prime)
I don't understand what I am doing wrong...its supposed to tell whether the inputted number is prime or not