Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Homework NoEffort
a= 1,2,3,4,5,6,7,8,9
b=2,4,8,0
by combining two varables(integers assign to these variables) i need the output as follows
output:
1,2,3,4,5,6,7,8,9,0
Posted 18-Jan-13 19:37pm
Edited 19-Jan-13 1:32am
v3
Comments
ridoy at 19-Jan-13 1:42am
   
Seems to be homework.So try it yourself first.
jibesh at 19-Jan-13 2:21am
   
any effort so far?
 
You wont get a ready to use solution for your homework here in CP. your homework was set for some reason so you have to workout by self. start writing your code and if you have any problems with your code we will help you to solve that.
 
I can give some hints but not a solution.
by using the combination of these operations you can achieve this i.e string comparison and string concatenation.
Mohibur Rashid at 19-Jan-13 7:35am
   
Do you even know what is reason of the output? what kind of mathematics is applied? if no i would like to suggest you something...................

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Haven't you posted that same question yesterday. It was deleted a short while later.
 
My advice was to use std::set<int> to collect all the elements of your two sets. And what you call "combining" is probably the union of the two sets.
 
Now, try that and if you run into problems show us the code you have so far.
  Permalink  
v2
Comments
Mohibur Rashid at 19-Jan-13 9:13am
   
if you didn't mention he would never know what is this thing anyway

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 210
1 Richard MacCutchan 100
2 kbrandwijk 90
3 ChauhanAjay 80
4 ProgramFOX 80
0 Sergey Alexandrovich Kryukov 9,050
1 OriginalGriff 8,151
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 19 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100