No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I'm trying to write a code to take in strings of "Name Surname City" separated by spaces which are then sorted alphabetically first by city then surname then name. I have it as far as extracting the idividual elements of the string but don't know how to implement the bubblesort. … | |
Hi, I'm trying to write a programme that will take user input strings containing name, surname and city of residence separated by spaces and extract each one and print them out individually. Here's what I have so far. [CODE]#include <iostream> #include <stdio.h> #include <cstring> using namespace std; int main() { … | |
Hi I'm trying to write a program that will print the results of the series sqrt(1), sqrt(1)+sqrt(2), sqrt(1)+sqrt(2)+sqrt(3),...., sqrt(1)+sqrt(2)+sqrt(3)+...+sqrt(n) where n is chosen by the user. The output should look something like 1, 2.414, 4.146, 6.146, 8.382, 10.831, ..... Here's what I have so far [CODE]#include <iostream> #include <cmath> using … |