This forum is in archive mode. You will not be able to post new content.

Author Topic: Give me c++ questions/assignments for doing as a practice(read below)!  (Read 4799 times)

0 Members and 1 Guest are viewing this topic.

pllaybuoy

  • Guest
So first of all what I know in c++
input and output from console and file(.txt) ,loops and statements , arrays,2d arrays , structures , references ,unions,enumerators , pointers(pointers to arrays,to variables , to pointers , to functions and everything) , funtions of every type inlcuding overloaded functions and function templates including overloaded templates .
I'll be starting the OOP part of c++ soon (objects classes and stuff) , so before moving on to that I want to make sure I have good grasp on what I've studied by now , so could you guys help me out by giving questions and assignments please ? I mostly come to this community because of the programming stuff since I'm shit at cyber security and hacking
And please no OOP , you can include anything from what is mentioned above .
 I mostly come to this community because of the programming stuff since I'm shit at cyber security and hacking and before getting into hacking I am trying to get good programming , I am taking php side by side too
So....watap

Edit : Make sure not to give some assignments from networking ,I am only studying it for my cisco tests and that includes nothing related to socket programming :/ Beside that you can make your questions as hard as you can
« Last Edit: October 17, 2012, 10:43:40 AM by pllaybuoy »

Offline s3my0n

  • Knight
  • **
  • Posts: 276
  • Cookies: 58
    • View Profile
    • ::1
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #1 on: October 17, 2012, 12:12:01 PM »
Generate n! where n is a user chosen fibonacci number.
Emulate a change machine that gives as least amount of notes and coins as possible.
Print out all permutations of characters in a given string.
Easter egg in all *nix systems: E(){ E|E& };E

pllaybuoy

  • Guest
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #2 on: October 17, 2012, 12:37:52 PM »
I am getting the assignment 1 and 3 , just have to find a way through
but be a bit precise with second one,emulate a changemachine that gives as least amount of note and coins as possible , means it will return the answer in number of note(the lowest one) and the rest in coins , is that so ?


---------------------------------------------------------------------------------
p.s :Everybody is allowed to give assignments and questions thank you :)

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #3 on: October 17, 2012, 12:50:57 PM »
Try out challenges we had? http://evilzone.org/weekly-challenge/
Suggest yours too!

Offline blackboxx

  • /dev/null
  • *
  • Posts: 11
  • Cookies: 0
  • Programmer, Student
    • View Profile
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #4 on: October 17, 2012, 12:54:03 PM »

blackboxx's Assignment:


My assignment should show skill, using loops, functions, arrays/pointers, and class struct, to a degree. Knowing me, I like applications, that can calculate specific things, so my assignment will be to make a calculator. This calculator should allow the user to be able to find the sum, difference, product, and quotient of numbers. An easy approach would've been to ask the user to input just two numbers, and operate on those two only. However, as a programmer, you want the user to have flexibility with how they use the program, instead of limitations, so the user will be prompted, how many numbers they want to input, to be operated.


For instance:


1 + 78.4 + 88.44545 + 4435345.545


OR


45.9 * 34.4 * 4345.55


- The user should be able to input how many numbers they want to input into the program, to be added, subtracted, multiplied, divided, or all.


- The user should be prompted with choices: Add, Subtract, Multiply, Divide, All, Exit.


- There should be exception handling in your program, to prevent logical errors, and run-time errors.


- You should use a class structure, or class structures, to make this program, since we want to take an object oriented approach.

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #5 on: October 17, 2012, 01:18:29 PM »
blackboxx's Assignment:

derp
Maybe you should of posted that in Weekly challenge? Before you do that you should contact the admins :P

Offline s3my0n

  • Knight
  • **
  • Posts: 276
  • Cookies: 58
    • View Profile
    • ::1
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #6 on: October 17, 2012, 01:38:52 PM »
I am getting the assignment 1 and 3 , just have to find a way through
but be a bit precise with second one,emulate a changemachine that gives as least amount of note and coins as possible , means it will return the answer in number of note(the lowest one) and the rest in coins , is that so ?


---------------------------------------------------------------------------------
p.s :Everybody is allowed to give assignments and questions thank you :)


The change machine would work like this:
Say the currency has dollars: 100,50,20,10,5,2,1.
And it has cents: 50,20,10,5.
If the customer wants to buy something that costs $512.45, and he gives you $650,
the change machine will give back $137.55 using following dollars and cents:
Dollars: 100,20,10,5,2
Cents: 50,5
Easter egg in all *nix systems: E(){ E|E& };E

Offline blackboxx

  • /dev/null
  • *
  • Posts: 11
  • Cookies: 0
  • Programmer, Student
    • View Profile
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #7 on: October 17, 2012, 02:57:50 PM »
Maybe you should of posted that in Weekly challenge? Before you do that you should contact the admins :P


Oh, I initially made this assignment for this user, since he needed some practice. I could come up with other things for the weekly challenge though. Thanks.

pllaybuoy

  • Guest
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #8 on: October 17, 2012, 03:23:29 PM »
@blackboxx : I will try doing that assignment WITHOUT the OOP approach , because as I mentioned above ,I am 'not' in oop yet .

@ande : Very interesting , I'll try them too , the MUD one seems challenging ,and btw in that XgirlsYcup  ,could you tell me what library or function is used in c++ to access an online search engine ?

And hey the WEEKLY challenge board seems quiet dead , add some life to it? post more ^_^


Edit : Just to remind you guys I am no pro in it , just a determinant learner , Don't mind stupid questions like 'which library contains such functions " or stuff , Its been almost 4months since I've started learning c++
« Last Edit: October 17, 2012, 03:26:53 PM by pllaybuoy »

Offline blackboxx

  • /dev/null
  • *
  • Posts: 11
  • Cookies: 0
  • Programmer, Student
    • View Profile
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #9 on: October 17, 2012, 05:54:11 PM »
Aw man, I missed that. I think you'll love using class structures, as oppose to the long methods. coolcool lol

zohraan

  • Guest
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #10 on: October 17, 2012, 06:36:31 PM »
I don't have any question but I want you to teach me a single command per day, :D what about this ? :)

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #11 on: October 17, 2012, 07:37:23 PM »
I don't have any question but I want you to teach me a single command per day, :D what about this ? :)
What about you stop begging people and PM'ing me and others to teach you everything?? what about you take a god damn book and start learning like normal people do?? WHAT ABOUT THAT!?
« Last Edit: October 17, 2012, 07:37:37 PM by Kulverstukas »

pllaybuoy

  • Guest
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #12 on: October 17, 2012, 08:09:06 PM »
I don't have any question but I want you to teach me a single command per day, :D what about this ? :)

There is nothing like a COMMAND in programming , there are different parts and concepts of programming, you better take a book and start by your own , if you have any confusions then feel free to make a post

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #13 on: October 17, 2012, 08:21:33 PM »
Apply dijkstras algo. to calculate shortest path by taking input from a text file with some pre determined format.

Ex
a: b(10);c(12);d.....:


This defines the vertex "a" having two edges connecting it to b and c with the length in brackets.


Now the output should be

A->x: b,c,d(total distance):

Meaning to go from a to x you need to take the route b,c,d..

This output can be saved in another txt.


You get to learn string processing, file handling and the algorithm itself.
"Always have a plan"

Offline Daemon

  • VIP
  • Baron
  • *
  • Posts: 845
  • Cookies: 153
  • A wise man fears a gentle mans anger
    • View Profile
Re: Give me c++ questions/assignments for doing as a practice(read below)!
« Reply #14 on: October 17, 2012, 09:56:17 PM »
Honestly, learn OOP as soon as possible because it will make your life wayyy easier. Try creating a program that:
1.reads data from a file you make that has 3 repeating words
2.sorts it into 3 different arrays that are defined with a struct
3.returns the size of each array to the user
4.has a repeat again option

This lifestyle is strictly DIY or GTFO - lucid

Because sexploits are for h0edays - noncetonic


Xires burns the souls of HF skids as a power supply

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.