0
Go4Expert Founder
They will appear once on a page. You will see it on the seventh post of the thread.
0
Newbie Member
hey guys,

Was just interested if with the GCD function if its possible to find the GCD of 3 different numbers rather than just 2? Would be interested to see it.

Thanks
0
Go4Expert Member
helloo
0
Light Poster
liked the way to do manipulations done in LCM and GCD programs
0
Ambitious contributor
hi everyone!
I have code following:
You see and shift it
Code:
```struct ths
{
char ht[24];
char tt[21];
int sobd;
float m,l,;
};
class ts
{
private:
int sots;
ths *ts;
public:
ts()
{
sots = 0 ;
ts = NULL;
}
void swap();
};

void ts::swap()
{
int n = sots;
for ( int i = 1; i < n; ++i)
for (int j = i + 1; j <= n; ++j)
if (ts[i].m < ts[j].m)
{
ths tmp = ts[i];
ts[i] = ts[j];
ts[j] = tg;
}
}```
// thanks.

Last edited by shabbir; 22Jul2007 at 19:57.. Reason: Code block - http://www.go4expert.com/forums/misc.php?do=bbcode#code
0
Go4Expert Founder
Offtopic comment:
Use code tag ([ code][/code ]) when you have code snippets in the post.
0
Ambitious contributor
Quote:
Originally Posted by shabbir
Offtopic comment:
Use code tag ([ code][/code ]) when you have code snippets in the post.
Thanks so much, my friend!
this is code in C++, how do you see ?
ofcourse, Class in C++ is difficult.
What way do you help me to express easy?
0
Ambitious contributor
hi everybody!
Follow you, Can we do in swap 2 structs easier?
Code:
```tmp = ts[i] ;
ts[i] = ts[j];
ts[j] = tmp;```
thanks.
0
Go4Expert Founder
You can swap the struct if they are addresses and not the objects can be done in that way unless they have the overloaded = operator.
0
Ambitious contributor
thank, but can we do easier for it ?
not tmp.