Where can I get C++ assignments?

Hello everyone!

I've been re-studying C++ for two weeks and I have some experience in programming prior to that, but it was long time ago so. Anyway, I have a question: where can I get a bank of coding assignments to practice my coding skills? It can be a site or a downloadable book, no problem. The thing is that if you recommend doing exercises in some C++ intro book, it will be too simple for me. I need something of intermediate level or something simple but not as easy as "Input two numbers and print their sum".

I'd appreciate any help.
Don't know any specific books but...

Convert regular language to morse code

Prime number test

Make a program where you can have a "conversation" with the computer

Those are just some ideas...
Last edited on
Hm, of all the ideas the first one sounds very interesting, thanks :)
Or if morse code is too hard, just do something like you type in something, a code comes out, or you type in the code, the normal version comes out. Heres my code, maybe you can make it more interesting:

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
#include <iostream>

using namespace std;

int main()
{
    while(true){
        string what;
        cout<<endl<<"translate or create?";
        cin>>what;
        if(what=="create"){
            long long int time;
            cout<<"how many letters including spaces?";
            cin>>time;
            char name[time];
            cout<<"what is the word or words?(use underscore for space)";
            cin>>name;
            for(long long int a=0;a<time;++a){
                if(name[a]=='a'){cout<<" 1";}
                else if(name[a]=='b'){cout<<" 2";}
                else if(name[a]=='c'){cout<<" 3";}
                else if(name[a]=='d'){cout<<" 4";}
                else if(name[a]=='e'){cout<<" 5";}
                else if(name[a]=='f'){cout<<" 6";}
                else if(name[a]=='g'){cout<<" 7";}
                else if(name[a]=='h'){cout<<" 8";}
                else if(name[a]=='i'){cout<<" 9";}
                else if(name[a]=='j'){cout<<" 0";}
                else if(name[a]=='k'){cout<<" ~";}
                else if(name[a]=='l'){cout<<" !";}
                else if(name[a]=='m'){cout<<" @";}
                else if(name[a]=='n'){cout<<" #";}
                else if(name[a]=='o'){cout<<" $";}
                else if(name[a]=='p'){cout<<" %";}
                else if(name[a]=='q'){cout<<" ^";}
                else if(name[a]=='r'){cout<<" &";}
                else if(name[a]=='s'){cout<<" *";}
                else if(name[a]=='t'){cout<<" (";}
                else if(name[a]=='u'){cout<<" )";}
                else if(name[a]=='v'){cout<<" -";}
                else if(name[a]=='w'){cout<<" =";}
                else if(name[a]=='x'){cout<<" +";}
                else if(name[a]=='y'){cout<<" |";}
                else if(name[a]=='z'){cout<<" \\";}
                else if(name[a]=='_'){cout<<" _";}
            }
        }
        else if(what=="translate"){
            unsigned long long int time;
            cout<<"how many symbols?";
            cin>>time;
            char name[time];
            for(long long int a=1;a-1<time;++a){
                if(a==1){cout<<"what is the 1st symbol?";cin>>name[0];cin.ignore();}
                else if(a==2){cout<<"what is the 2nd symbol?";cin>>name[1];cin.ignore();}
                else if(a==3){cout<<"what is the 3rd symbol?";cin>>name[2];cin.ignore();}
                else{cout<<"what is the "<<a<<"th symbol?";cin>>name[a-1];cin.ignore();}
            }
            for(long long int a=0;a<time;++a){
                if(name[a]=='1'){cout<<"a";}
                else if(name[a]=='2'){cout<<"b";}
                else if(name[a]=='3'){cout<<"c";}
                else if(name[a]=='4'){cout<<"d";}
                else if(name[a]=='5'){cout<<"e";}
                else if(name[a]=='6'){cout<<"f";}
                else if(name[a]=='7'){cout<<"g";}
                else if(name[a]=='8'){cout<<"h";}
                else if(name[a]=='9'){cout<<"i";}
                else if(name[a]=='0'){cout<<"j";}
                else if(name[a]=='~'){cout<<"k";}
                else if(name[a]=='!'){cout<<"l";}
                else if(name[a]=='@'){cout<<"m";}
                else if(name[a]=='#'){cout<<"n";}
                else if(name[a]=='$'){cout<<"o";}
                else if(name[a]=='%'){cout<<"p";}
                else if(name[a]=='^'){cout<<"q";}
                else if(name[a]=='&'){cout<<"r";}
                else if(name[a]=='*'){cout<<"s";}
                else if(name[a]=='('){cout<<"t";}
                else if(name[a]==')'){cout<<"u";}
                else if(name[a]=='-'){cout<<"v";}
                else if(name[a]=='='){cout<<"w";}
                else if(name[a]=='+'){cout<<"x";}
                else if(name[a]=='|'){cout<<"y";}
                else if(name[a]=='\\'){cout<<"z";}
                else if(name[a]=='_'){cout<<" ";}
            }
        }
    }
    return 0;
}
Topic archived. No new replies allowed.