Skip to content

Commit

Permalink
fixes ChicoState#1 merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
acsanden committed Oct 9, 2023
2 parents 175ca73 + c79a032 commit 3bf1a76
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#include <iostream>
#include <string>

using std::string;
using std::cout;
using std::getline;
using std::endl;
using std::cin;

const int RGB_HEX_LENGTH = 7;
int main(){
std::string input;
Expand All @@ -17,10 +23,11 @@ int main(){
}else if(input[0] != '#' || (!isxdigit(input[1]) || !isxdigit(input[2]) || !isxdigit(input[3]) || !isxdigit(input[4]) || !isxdigit(input[5]) || !isxdigit(input[6]))){
std::cout << "Please enter the color in hexadecimal format, starting with # followed by six hex values\n";
state = false;

}
}while( input.size() != RGB_HEX_LENGTH || state == false );

std::cout << "Your hex color is: " << input << std::endl;
cout << "Your hex color is: " << input << endl;

return 0;
}

0 comments on commit 3bf1a76

Please sign in to comment.