79602404

Date: 2025-05-01 19:01:21
Score: 1
Natty:
Report link
#include<iostream>
using namespace std;
int main()
{
    int hours;
    int fee=0;
    cout<<"Enter the total number of hours spent at the gym;";
    cin>>
    //input validation
    if(!(cin>>hours)||hours<=0)
    {
        cout<<"Invalid input.Please enter a positive number of hours."<<endl;
    }
    else
    {
        cout<<"nooooooooooooo";
    }
    
}
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user30423688