Find the error(s) in each of the following program segments and explain how the error(s) can be corrected:
vi) float calculateSquare(float number) { return number * number; }
#include <iostream>
using namespace std;
float calculateSquare(float number) { return number * number; }
int main() {
cout<<calculateSquare(5.57) ;
return 0;
}
// There are no errors in the program
Comments
Leave a comment