Programming with LINES and Printing

I am a 66 year old guy who wanted to Buy an APP only to find out they cost between $5000 to $8000 bucks! CRAZY huh (btw: I'm giving it away)

anyway I understand I can do the same thing as a C++ program, so I took on the task of learning to program C++
after 4 weeks (I don't work remember)

I finished the basic program language BUT I haven't figured out how to PUT in individual blank LINES, or Lines with a Statement or a few lines
and then I want to separate the TOP DATA from the Bottom data ....& print it all out
++++++++++++++++++++++

do I use cout << "this is a line;"; ???
then I want to Skip a line or 2 maybe 3

And next I need to Print my data
can't I just say lprint data1; lprint data2; lprint data3; //I know lprint isn't the right code... it use to be for basic... ( i think you are laughing, I a beginner hahhah)

maybe it's lprint << The Corner value is; corners;

tony

Hey Tony,

Sounds like you have made some good headway.

A few things I would like to know about your code so that I can help you write the code to do whatever it may be that you want to do.

When you press reply on the bottom, the edit box will pop up. On the right of the text box there is a label "Format:". Under it are 12 buttons, If you could press that button and put in your code between the two code tags, this way I can look at your code and tell you where you can fix things or help you put new functions in.

A Few Questions:

1.) What is the purpose of your code? (i.e. what do you want it to be able to do?)

2.) I am assuming you are running the code through the command console. If you don't want to show me the code, that's fine. But could you try explaining what kind of input you would use and what your expected output should be?

I'll be able to help you out much more efficiently once I know exactly what it is you are stuck on.
You want to build an app that costs $5000-$8000, and you are asking how to print out lines? Hmm.

You want to print out blank lines?

std::cout << std::endl;

Do that however many times you want a blank line.
Gl tony
smax89! The APP is suppose to cost between 5000 & 8000 ! I never wrote an app and I ain't paying anybody 5000 grand.

Militei
Yes... with nothing else doing-- I guess I have progress alittle. I have a website called CirculatedCurrency.com . I love collecting USA Money! (who wouldn't haha) Now for 20 years I have watched people pay Grading companies rip people off.... The Grading companies charge crazy amounts of CASH to grade a USA Note. Then someone gets the bright idea to remove the note from the holder and send the same serial numbered note to another grading company. They use a scale from 1 to 70
======
I have PROOF! stolencurrency.com (regrading)
===============
SO what I did is create a NEW grading SYSTEM for Circulated Currency... on a scale from 0 to 100 .. people get to grade their own notes. I LET PEOPLE DOWNLOAD THIS FREE (crazy huh)

My brother says make an app! Get me where I'm going? (he uses an iphone)

=========

#include <iostream>

using namespace std;

const char newline = '\n';

int main()
{ 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 y;
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

cout << "Are you looking at the OBVERSE side of a note: 0=yes ";
cin >> x;


cout << "Look at the CORNERS on a scale from 0 to 5 look at the corners:";
cin >> corners; '\n';


// cout << "value for Corners is " << corners; '\n';

cout <<"Look to see if there any Tears -scale 0 to 5 enter TEARS:";
cin >> tears; '\n';
//cout << "value for TEARS is:" << tears; '\n';

cout <<"For Pencil or INK scale from 0 to 10 enter:";
cin >> ink; '\n';
//cout << "value for pencil or ink mark is " << ink; '\n';

cout <<"Look to see if the Note had been Pressed or IRONED scale from 0 to 5 enter:";
cin >> ironed; '\n';
//cout << "value for Pressed or Ironed is:" << ironed; '\n';

cout <<"Look to determine Crinkles or Holes scale from 0 to 10 enter:";
cin >> holes; '\n';
//cout << "value for Crinkles or Holes is " << holes ; '\n';

cout <<"Look at the Color scale from 0 to 10 enter:";
cin >> color; '\n';
//cout << "value for Color is " << color ; '\n';

cout <<"Look at note if it's DIRTY scale from 0 to 5 enter: " ; '\n';
cin >> dirt ; '\n';
//cout << "value for Dirt is " << dirt ; '\n';

cout <<"Look for INK Smears scale from 0 to 5 enter: " ; '\n';
cin >> smears ; '\n';
//cout << "value for Ink Smears is " << smears ; '\n';

cout <<"Look for Stains scale from 0 to 10 enter: " ; '\n';
cin >> stains ; '\n' ;
//cout << "value for STAINS is " << stains ; '\n';

cout <<"Look to see if the Margins are EVEN scale from 0 to 5 enter: " ; '\n';
cin >> margins ; '\n';
//cout << "value for Even Margins is " << margins ; '\n';

cout <<" Look to see how many Folds scale from 0 to 10 enter: " ; '\n';
cin >> folds; '\n';
//cout << "value for folds is " << folds ; '\n';

cout <<"Determine the Overall condition scale from 0 to 20 enter: " ; '\n';
cin >> overall; '\n';
//cout << "value for Overall Condition is " << overall ; '\n';

score += corners + tears + ink + ironed + holes + color + dirt + smears + stains + margins + folds + overall ; '\n';
cout << "Total Condition>>OBVERSE is " << score; '\n';

// for the reverse

cout << "Are you looking at the REVERSE side of a note: 0=yes ";
cin >>y;


cout << "Look at the CORNERS on a scale from 0 to 5 look at the corners:";
cin >> corners2; '\n';


// cout << "value for Corners is " << corners; '\n';

cout <<"Look to see if there any Tears scale 0 to 5 enter TEARS:";
cin >> tears2; '\n';
//cout << "value for TEARS is:" << tears; '\n';

cout <<"For Pencil or INK scale from 0 to 10 enter:";
cin >> ink2; '\n';
//cout << "value for pencil or ink mark is " << ink; '\n';

cout <<"Look to see if the Note had been Pressed or IRONED scale from 0 to 5 enter:";
cin >> ironed2; '\n';
//cout << "value for Pressed or Ironed is:" << ironed; '\n';

cout <<"Look to determine Crinkles or Holes scale from 0 to 10 enter:";
cin >> holes2; '\n';
//cout << "value for Crinkles or Holes is " << holes ; '\n';

cout <<"Look at the Color scale from 0 to 10 enter:";
cin >> color2; '\n';
//cout << "value for Color is " << color ; '\n';

cout <<"Look at note if it's DIRTY scale from 0 to 5 enter: " ; '\n';
cin >> dirt2; '\n';
//cout << "value for Dirt is " << dirt ; '\n';

cout <<"Look for INK Smears scale from 0 to 5 enter: " ; '\n';
cin >> smears2; '\n';
//cout << "value for Ink Smears is " << smears ; '\n';

cout <<"Look for Stains scale from 0 to 10 enter: " ; '\n';
cin >> stains2 ; '\n' ;
//cout << "value for STAINS is " << stains ; '\n';

cout <<"Look to see if the Margins are EVEN scale from 0 to 5 enter: " ; '\n';
cin >> margins2 ; '\n';
//cout << "value for Even Margins is " << margins ; '\n';

cout <<" Look to see how many Folds scale from 0 to 10 enter: " ; '\n';
cin >> folds2; '\n';
//cout << "value for folds is " << folds ; '\n';

cout <<"Determine the Overall condition scale from 0 to 20 enter: " ; '\n';
cin >> overall2; '\n';
//cout << "value for Overall Condition is " << overall ; '\n';

score2 += corners2 + tears2 + ink2 + ironed2 + holes2 + color2 + dirt + smears2 + stains2 + margins2 + folds2 + overall2 ; '\n';
cout << "Total Condition> REVERSE =" << score2; '\n';


return 0;
}


I'm giving this out free.... I wanted to PRINT the OBVERSE and REVERSE data to a PRINTER
can not figure this out!???
I also was trying to add a LINE with Nothing on it except a LINE???

"and for this version" this REVERSE condition keeps adding up to 101 and I can't figure out how to fix that! ???
===========
I'm not a programmer, I'm a retired Mechanical Engineer and I figured getting this far was ok hahhahah it's not that complicated and I would improve it as I go!

and to make an APP is crazy!
There is more info on my web page

http://www.circulatedcurrency.com/free/1/index.html

any help would be greatly appreciated
ynotmi
Last edited on
Smac89 Thank YOU thank you! thank you!

It took me acouple times to read this std::cout << std::endl; then I realized,
OH MY GOSH that's how to put in LINES! (maybe someone could change the colors such that answers stick out)

It really works!
COOL

now!
Problem 1 -- is there anyway to change the background to white and the letters to BLACK
I print the answer out and it fits in a LARGE holder.... but I'm afraid I will kill a printer cartridge!
hahhah

OH HOW did I print that! USING SNIPPING software! I highlighted and printed it
then I cut out the DATA
cool huh!

NOW! How do I change this to a WINDOWS (not dos) Program???? I told u I was learning hahhaha
Tony
yes there is a way to change color just add this command
system ("color xy");

x-is the background
y-is the text color

these are the color codes


0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White

so just replace the numbers and letters with x and y

hope this is what you asked.
KUNZ thank you ! that is great

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
#include <iostream>
#include <iomanip>
#include <cmath>
#include <fstream>

using namespace std;


/**
	as of May 11th 2015
 An one can grade a USA Currency all you have to do is Practice.
 The attributes are very similar to the Grading Companies. The exception this FREE system uses a Scale from 1 to 100
 Please only enter the values that are indicated or there will be an error.  
 
	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() 
{   	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 y;
			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;
		int lprint;
		
// need to start on the Obverse side of the note

    cout << "Are you looking at the OBVERSE side of a note: 0=yes  ";
		cin >> x; 
			
	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  ";
		cin >> x; 
			
		
	cout << "Look at the CORNERS on a scale from 0 to 5 look at the corners:"; 
		cin >> corners2; '\n';
		
	    cout <<"Look to see if there any Tears scale 0 to 5 enter TEARS:";  	
		cin >> tears2; '\n';
  	  		
    cout <<"For Pencil or INK scale from 0 to 10 enter:"; 
		cin >> ink2; '\n';
  		
  		cout <<"Look to see if the Note had been Pressed or IRONED scale from 0 to 5 enter:"; 
			cin >> ironed2; '\n';
  		
  		cout <<"Look to determine Crinkles or Holes scale from 0 to 10 enter:"; 
		cin >> holes2; '\n';
  	
    cout <<"Look at the Color scale from 0 to 10 enter:";	
	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 + dirt + 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");
 	
 
	cout << "Total Condition> REVERSE =" << score2; ".\n";
 std::cout << std::endl;
 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-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;
	    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-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;
	    std::cout << std::endl;
	    
	    cout << endl;    
	    
	    
		// cin.get();   got check this
		return 0; 
}


Check this out! (hopefully I did that correctly)
-------------
Thank you guys again! and save star NOTES!
--------------------

btw:
1. Problem: when I run the program as an EXE it doesn't stop... do I have the right exit code? or do I have to STOP it ???

2. Problem: Is there any way to make this run in windows by itself NOT a Command window?

3. Problem: I notice something with all this editing? How do I save a New Project Number and still keep the software in the same folder? Every time I change the name of the project it doesn't change it, in the program? weird? or what?
( I will figure this out-- I'm using DEV-C++ 5.10)
add this code before
1
2
3
4
5
.
.
system ("PAUSE");
return 0;
}


The .exe should stop now
your program is lacking validation
further explanation
when your exe asks
 
Are you looking at the OBVERSE side of a note: 0=yes  


what if the user enters "any thing else apart from "0"
you have to tell the user that it is an incorrect option

i hope you are understanding what i am saying
KUNZ
Absolutely! BUT I have been working on just getting the program to work! hahhah
You guys have been great! thank u thank you thank u!
===============
1. Lets assume I get the Validation in the program. for the guy who enters a letter or a character! and when I get a 6 or 7 when the max is 5! duh!

2. is there any way I can keep the program secure without anybody putting a virus in it? Most systems will not allow .exe files to be transferred... So I'll have to ZIP it!

3. When the program prints out I then use SNIPING software (free frm microsoft) highlite the data and print that from the snipping program. I wonderif I can make the FONT alittle smaller I'll have to look up System ("font 10"); or system ("font 8"); (I'm learning)

thank again
tony







Topic archived. No new replies allowed.