C++ Basic Syntax Practice – Comprehensive Application of Branch Structures (Part II)
B2047 Piecewise Function #include <iostream> using namespace std; int main(){ float N, y; cin >> N; if(N < 5){//0 <= x < 5 y = -N + 2.5; } else if(N < 10){//5 <= x < 10 y = 2 – 1.5 * (N – 3) * (N – 3); } else {//10 <= x … Read more