Advertisement
Maco153

Trace

Oct 6th, 2019
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     double c1 = 4, c2 = 1.758, y;  
  7.     int j = 5.88, k = 2, n = 4.99, m ; 
  8.     n = n + 2.55;  
  9.     n = (n + 1) / 3 + c1;  
  10.     m = 4.75 +(n - 3) / j; 
  11.     j = (n + 2) % m;   
  12.     k = m % (n + 1);   
  13.     if (j == k)
  14.         y = (n + k) / (m + j) + c2;
  15.     else
  16.         y = (m + j) / (n + k) + c2;
  17.  
  18.     cout.setf(ios::fixed);
  19.     cout.setf(ios::showpoint);
  20.     cout.precision(2);
  21.     cout << "The value of j = " << j << endl;  
  22.     cout << "The value of k = " << k << endl;
  23.     cout << "The value of m = " << m << endl;
  24.     cout << "The value of n = " << n << endl;
  25.     cout << "The value of y = " << y << endl;
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement