Checking Valid Data

Description:

Check entered student mark is valid or not Test Case 1 Input (stdin) 125 Expected Output Invalid Mark Test Case 2 Input (stdin) -5 Expected Output Invalid Mark

Program :

#include <iostream>

using namespace std;

int main()

{

  float n;

  cin>>n;

  if(n<0)

 

    cout<<"Invalid Mark";

  else if(n<=100)

    cout<<"Valid Mark";

  else

    cout<<"Invalid Mark";

return 0;

}