#include <iostream>
using namespace std;
int main() {
int x = 5, y;
while (x < 2000) {
if (x <= 75) {
y = x * x;
}
else if (75 < x <= 225) {
y = 78 * x;
else if (x > 225) {
y = 576 * x + 10;
cout << "X=" << x << "||" << "Y=" << y << endl;
x += 20;
return 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main() {
int x = 5, y;
while (x < 2000) {
if (x <= 75) {
y = x * x;
}
else if (75 < x <= 225) {
y = 78 * x;
}
else if (x > 225) {
y = 576 * x + 10;
}
cout << "X=" << x << "||" << "Y=" << y << endl;
x += 20;
}
return 0;
}