20.) In this c++ program. Create a flowchart and algorithm.
Source Code:
#include using namespace std;int main() { int i, n; // Take input from user. cout < "print="" all="" even="" numbers="" till="" :=""> cin >> n; cout < endl="">< "even="" numbers="" from="" 1="" to="" "="">< n="">< "="" are="" :="" "=""><> for(i = 1; i <= n;="" i++)="">=> // Check for even or not. if((i % 2) == 0) { cout < i="">< "=""> } } return 0;}
using namespace std;
int main() {
int i, n;
// Take input from user. cout < "print="" all="" even="" numbers="" till="" :=""> cin >> n;
cout < endl="">< "even="" numbers="" from="" 1="" to="" "="">< n="">< "="" are="" :="" "=""><>
for(i = 1; i <= n;="" i++)="">=>
// Check for even or not. if((i % 2) == 0) {
cout < i="">< "="">
} }
return 0;}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here