I have a MATH Issue?? & the program is making NUMBERS

Thanks all that have helped me get this C++ program going.
-----
1. Problem: The program is not adding up the data correctly? The OBVERSE data adds up... The REVERSE data either adds 3 points (win 8.1) on one machine and 89 points on another machine (Win 7)
Now when I run it on here- perfect! weird!? just enter 1 for OBVERSE & REVERSE and see.
2. I tried to download a Program to convert C++ to Android APPs... and there seems to be alot of them. Some of these cost 2000 bucks? Crazy or what?
CAN someone with experience please tel me which one to download for FREE.
I only have one APP and it's this one.
Tony

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
 #include <iostream>
#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>

using namespace std;


/**
		This program is WORK IN PROGRESS!  
 As time goes on, I will improve it but right now it's pretty RAW
 This is a way to grade your USA Notes.... It's your grade!  It's a Value just for YOU.
 Be Honest, it's your system
  Watch for upgrades to this program 
 
 Thank you for Collecting USA Currency
 *********/
 
int main() 
{

cout <<	"Program is up top date as of May 14th 2015"; 
std::cout << std::endl;
std::cout << std::endl; 
cout << "Anyone can grade a USA NOTE, all you have to do is Practice.";
std::cout << std::endl; 
cout << "The attributes are very similar to the Professional Grading Companies." ;
std::cout << std::endl;
cout <<"The exception: this is a FREE system & uses a Scale from 1 to 100";
std::cout << std::endl;
cout << "Please enter up to the MAX values that are indicated or there will be an error"; 
std::cout << std::endl;
cout << "It is strickly for Circulated Currency";   
std::cout << std::endl;
cout << "Go here for WHY: http://www.circulatedcurrency.com/free/1/index.html" ;
std::cout << std::endl;
std::cout << std::endl;
std::cout << std::endl;


	int date;
	int serial;
   	int corners;
		int tears;         
		int ink;
		int holes;
		int color;		
		int dirt;
		int smears;
		int margins;
		int folds;
		int overall;
		int stains;
		int score;
		int ironed;
		int stop;
		int x;
		int corners2;
		int tears2;         
		int ink2;
		int holes2;
		int color2;		
		int dirt2;
		int smears2;
		int margins2;
		int folds2;
		int overall2;
		int stains2;
		int score2;
		int ironed2;
		
		
// need to start on the Obverse side of the note


string mystring;
cout << "Please enter the entire serial number   ";
  cin >> mystring;  ".\n";
		

    cout << "Are you looking at the OBVERSE side of a note: 0=yes  ";
		cin >> x; ".\n";
		
			
	cout << "Look at the CORNERS on a scale from 0 to 5 look at the corners:"; 
		cin >> corners; ".\n";
		
    cout <<"Look to see if there any Tears -scale 0 to 5 enter TEARS:";  	
		cin >> tears; ".\n";
  		
      cout <<"For Pencil or INK scale from 0 to 10 enter:"; 
		cin >> ink; ".\n";
  	  	
	cout <<"Look to see if the Note had been Pressed or IRONED scale from 0 to 5 enter:"; 
			cin >> ironed; ".\n";
  		
  	 cout <<"Look to determine Crinkles or Holes scale from 0 to 10 enter:"; 
		cin >> holes; ".\n";
  		

    cout <<"Look at the Color scale from 0 to 10 enter:";	
	cin >> color; ".\n";
  		
	cout <<"Look at note if it's DIRTY scale from 0 to 5 enter: " ;  ".\n";	
	cin >> dirt; ".\n";
  	
	cout <<"Look for INK Smears scale from 0 to 5 enter: " ; ".\n"; 	
	cin >> smears; ".\n";
  		
	cout <<"Look for Stains  scale from 0 to 10 enter: " ; ".\n"; 	
	cin >> stains;  ".\n";
  		
	cout <<"Look to see if the Margins are EVEN scale from 0 to 5 enter: " ; ".\n"; 	
	cin >> margins; ".\n";
  	
	cout <<" Look to see how many Folds scale from 0 to 10 enter: " ; ".\n"; 	
	cin >> folds; ".\n";
  	
	cout <<"Determine the Overall condition scale from 0 to 20 enter: " ;  ".\n";	
	cin >> overall; ".\n";
  	
	score += corners + tears + ink + ironed + holes + color + dirt + smears + stains + margins + folds + overall ; ".\n";   
	cout << "Total Condition>>OBVERSE is " << score; ".\n";
	
			std::cout << std::endl;
			std::cout << std::endl; 
// for the reverse

		cout << "Are you looking at the REVERSE side of a note: 0=yes";  ".\n";
		cin >>x; ".\n";
		
		x==0;
					
		cout << "Look at the CORNERS on a scale from 0 to 5 look at the corners:";  ".\n";
		cin >> corners2; ".\n";
		
	    cout <<"Look to see if there any Tears scale 0 to 5 enter TEARS:";  	".\n";
		cin >> tears2; ".\n";
  	  		
    	cout <<"For Pencil or INK scale from 0 to 10 enter:";  ".\n";
		cin >> ink2; ".\n";
  		
  		cout <<"Look to see if the Note had been Pressed or IRONED scale from 0 to 5 enter:";  ".\n";
			cin >> ironed2; ".\n";
  		
  		cout <<"Look to determine Crinkles or Holes scale from 0 to 10 enter:";  ".\n"; 
		cin >> holes2; ".\n";
  	
    	cout <<"Look at the Color scale from 0 to 10 enter:";   ".\n";	
		cin >> color2; ".\n";
  		
		cout <<"Look at note if it's DIRTY scale from 0 to 5 enter: " ;  ".\n";	
		cin >> dirt2; ".\n";
  	
		cout <<"Look for INK Smears scale from 0 to 5 enter: " ; ".\n";	
		cin >> smears2; ".\n";
  		
		cout <<"Look for Stains  scale from 0 to 10 enter: " ; ".\n"; 	
		cin >> stains2 ; ".\n";
  		
		cout <<"Look to see if the Margins are EVEN scale from 0 to 5 enter: " ; ".\n"; 	
		cin >> margins2 ; ".\n";
  		
		cout <<" Look to see how many Folds scale from 0 to 10 enter: " ; ".\n"; 	
		cin >> folds2; ".\n";
  	
		cout <<"Determine the Overall condition scale from 0 to 20 enter: " ;  ".\n";	
		cin >> overall2; ".\n";
  	
//	  x==0;

  	
	score2 += corners2 + tears2 + ink2 + ironed2 + holes2 + color2 + dirt2 + smears2 + stains2 + margins2 + folds2 + overall2 ; ".\n";   
 	std::cout << std::endl;
 
 //change color of Output data
 // system ("xy") 
 // x-is the background color
 // y-is the test color
 //0=Black 8=gray
 // 1=blue  9=light blue
 // 7=white  f=bright white
 
 system ("color f1"); 
 				
 std::cout << std::endl;
 std::cout << std::endl;
 std::cout << std::endl;
 
  
 	cout << "The Serial number is" <<"=" << mystring; ".\n";
     std::cout << std::endl;
     std::cout << std::endl;
	cout << "Total for Obverse=" << score; ".\n";
	std::cout << std::endl;
		
		cout << "Max-5 Corners" << "=" << corners; ".\n";
        std::cout << std::endl;
		
		cout << "Max-5 Tears:" << "=" << tears; ".\n"; 
	    std::cout << std::endl;
		  
		cout << "Max-10 Pencil/Ink" << "=" << ink; ".\n"; 
	    std::cout << std::endl;
		
		cout << "Max-5 Pressed/Ironed" << "=" << ink; ".\n"; 
	    std::cout << std::endl;
		
				
		cout << "Max-10 Crinkles/Holes" << "=" << holes; ".\n"; 
	    std::cout << std::endl;
		
		cout << "Max-10 Color" << "=" << color; ".\n";
        std::cout << std::endl;

		cout << "Max-5 Dirt" << "=" << dirt; ".\n"; 
	    std::cout << std::endl;
	    
	    cout << "Max-5 Ink SMEARS" << "=" << smears; ".\n"; 
	    std::cout << std::endl;
	    
	    cout << "Max-10 Stains" << "=" << stains; ".\n"; 
	    std::cout << std::endl;
	    
	    cout << "Max-5 Margins" << "=" << margins; ".\n"; 
	    std::cout << std::endl;
	    
	    cout << "Max-10 Folds" << "=" << folds; ".\n"; 
	    std::cout << std::endl;
	    
		cout << "Max-20 OVERALL" << "=" << overall; ".\n"; 
	    std::cout << std::endl;
		std::cout << std::endl;
	    std::cout << std::endl;
	   
	  // x==0;

 	   
	    cout << "The Serial number is" <<"=" << mystring; ".\n";
     std::cout << std::endl;
     std::cout << std::endl;	    
	    
		cout << "Total for Reverse" << "=" << score2; ".\n";
	 	std::cout << std::endl;
		
		cout << "Max-5 Corners" << "=" << corners2; ".\n";
        std::cout << std::endl;
		
		cout << "Max-5 Tears" << "=" << tears2; ".\n"; 
	    std::cout << std::endl;
		  
		cout << "Max-10 Pencil/Ink" << "=" << ink2; ".\n"; 
	    std::cout << std::endl;
		
		cout << "Max-5 Pressed/Ironed" << "=" << ironed2; ".\n"; 
	    std::cout << std::endl;
						
		cout << "Max-10 Crinkles/Holes" << "=" << holes2; ".\n"; 
	    std::cout << std::endl;
		
		cout << "Max-10 Color" << "=" << color2; ".\n";
        std::cout << std::endl;

		cout << "Max-5  Dirt" << "=" << dirt2; ".\n"; 
	    std::cout << std::endl;
	    
	    cout << "Max-5 Ink SMEARS" << "=" << smears2; ".\n"; 
	    std::cout << std::endl;
	    
	    cout << "Max-10 Stains" << "=" << stains2; ".\n"; 
	    std::cout << std::endl;
	    
	    cout << "Max-5 Margins" << "=" << margins2; ".\n"; 
	    std::cout << std::endl;
	    
	    cout << "Max-10 Folds" << "=" << folds2; ".\n"; 
	    std::cout << std::endl;
	    
	    cout << "Max-20 OVERALL" << "=" << overall2; ".\n"; 
	    std::cout << std::endl;
		std::cout << std::endl;
	    std::cout << std::endl;
	    
	            //cout << endl;    
	    		// cin.get();   got check this
		".";
		".";
		system ("PAUSE");
		return 0;
}
I'm pretty sure that Android Studio works with JDK. I guess this means you'll need to convert this code to Java so that you can create an .apk for distribution?
2. I tried to download a Program to convert C++ to Android APPs... and there seems to be alot of them. Some of these cost 2000 bucks? Crazy or what?
CAN someone with experience please tel me which one to download for FREE.
I only have one APP and it's this one.

If all you need to do is convert this program over to Java there is no need to buy or even download a free one to do the conversion.

At most this program just uses basic programming principles that are pretty much the same in most languages (Especially Java and C++) so it shouldn't take more then a few hours to a day (If you are still just learning) to convert the code from C++ to Java. And that estimate is on the high end.

Since you mentioned wanting to do some stuff with Android that will take some more time to learn about but you would still need to learn about it even with a conversion application.

So long story short if you want to convert this to Java just do it by hand there is no use wasting the time to find a good conversion software to do it for you, since more then likely that will take you more time then to do it yourself.
Thanks Texan40 & Zereo for the information.... experience is the best bet! I don't think I want to be a Programmer...at least not yet.

I AM CURIOUS! Did you look at the REASON for the Math calculation being WRONG? OBVERSE is Correct, but REVERSE is wrong. either a 3 or an 83 -Crazy huh? I've tried everything, well almost.... and still haven't gotten close. YET here, it works every time, WEIRD WEIRD!

The scores are weird because you are adding to score and score2 at lines 123 and 174, but you don't initialize those variables to zero. Fix that and it will be fine.
Notice that the code for getting the details of the obverse and reverse sides is nearly identical. You could factor this out by creating a class that holds the details for a side. A method can prompt the users for the details and the main program can tell the user which side's details to enter.
dhayden,
Thanks for the response I changed score2 to grade.

int grade;

grade += corners2 + tears2 + ink2 + ironed2 + holes2 + color2 + dirt2 + smears2 + stains2 + margins2 + folds2 + overall2 ; ".\n";

cout << "Total for Reverse" << "=" << grade; ".\n";
===========
BUT it added 15--> 3 points ???
I've changed these variables.... and that didn't work! I thin tried running this program on my Win 7 laptop.... and it added up as 89.... (very weird)

When the program runs on this system it's correct 12 -- by entering all 1's

CONFUSED??? Bewilder! ???
Texan40

OH MY GOSH! I download Android Studio! then I downloaded JAVA --then I tried to watch a Tutorial video .... I am overwhelmed! I thought C++ was confusing when I first downloaded DEV-C++ ..... but this android studio....WOW

No where did I find C++ to import? I thought that C++ and android were CLOSE? NOPE!
SO now I'm learning Android! It almost looks like C++ yikes
Tony
Thanks Guys for all your help

I figured out the Math issue by making grade=0 (yikes! who would have thought!)

Now I have to learn Android Studio! double YIKES
Topic archived. No new replies allowed.