@LoganDark/

UnconsciousLoyalComputerscience

C++

No description

fork
loading
Files
  • main.cpp
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>  // std::cin, std::cout

int main() {
	float price;
	
	while (true) {
		std::cout << ">";
		std::cin >> price;
		
		if (std::cin.fail()) {
			std::cout << "The price must be a number." << std::endl;
			
			continue;
		}
		
		break;
	}
}