Question: Really have no idea why I keep encountering this problem: * see picture * Your first unit test test 1 0 Compilation failed isLeapYear.cpp: In

Really have no idea why I keep encountering this problem: *see picture*Your first unit test test10
Compilation failed
isLeapYear.cpp: In function 'int testPassed(std::ofstreame)':
isLeapYear.cpp:32:9: error: 'test1' was not declared in this scope
Compilation failed
isLeapYear.cpp:44:9: error: 'test2' was not
*My code*#include
// Function to determine if a year is a leap year
bool isLeapYear(unsigned int inputYear){
// Check if the year is divisible by 4
if (inputYear %4==0){
// If the year is a century year, it must also be divisible by 400 to be a leap year
if (inputYear %100==0){
return inputYear %400==0;
}
// If not a century year, it is a leap year
return true;
}
// If not divisible by 4, it is not a leap year
return false;
}
int main(){
// Example usage
unsigned int year1=1712;
std::cout "Year " year1" is a leap year: " std::boolalpha isLeapYear(year1) std::endl;
unsigned int year2=1913;
std::cout "Year " year2" is a leap year: " std::boolalpha isLeapYear(year2) std::endl;
return 0;
}
 Really have no idea why I keep encountering this problem: *see

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!