c++ - Disruption in the count for both sides -
With this program I am trying to get an output that looks like something
A + B + C = 7
xMin = 3
xMax = 8
3 ---- 10
4 - -
7 ----
4 ---- 0
5 ---- 0
6-> 0
7 ---- 0
8 ---- 0
It only changes when I do not show all code of xMin or xMax, all the in-bewitens to display.
#include "stdafx.h" #include & lt; Iostream & gt; # Include & lt; Semith & gt; using namespace std; Int _tmain (int argc, _TCHAR * argv []) {int x = 0; Double A, B, C, XMIN, XMX; Double y = 0; Cout & lt; & Lt; "# 1 (a):"; Cin & gt; & Gt; a; Cout & lt; & Lt; "\ N # 2 (b):"; Cin & gt; & Gt; B; Cout & lt; & Lt; "\ # 3 (c):"; Cin & gt; & Gt; C; Cout & lt; & Lt; "Submit Exmin" & lt; & Lt; Endl; Cin & gt; & Gt; XMin; Cout & lt; & Lt; "Enter xx" & lt; & Lt; Endl; Cin & gt; & Gt; Xmax; Y = a + b + c + X; (Int calculation = xmin; count & lt; = xMax; calculation ++) {cout & lt; & Lt; Count & lt; & Lt; "\ T" & lt; & Lt; Y & lt; & Lt; "\ N"; } Return 0; }
Your for loop is incorrect (you are not) Updating upper bounds), change it to: y = a + b + c; (Int calculation = xmin; count & lt; = xMax; calculation ++) {cout & lt; & Lt; Count & lt; & Lt; "\ T" & lt; & Lt; Calculate + y & lt; & Lt; "\ N"; }
Comments
Post a Comment