ndeniche 402 Posting Virtuoso Featured Poster

^is very friendly

ndeniche 402 Posting Virtuoso Featured Poster

^not bad himself

ndeniche 402 Posting Virtuoso Featured Poster

^is in my contact list :P

ndeniche 402 Posting Virtuoso Featured Poster

it's a secret message from the devil... remember 'www' looks like vi-vi-vi', which means 666, which is the number of the beast... pretty sure that's it...

ndeniche 402 Posting Virtuoso Featured Poster

^a very nice guy

ndeniche 402 Posting Virtuoso Featured Poster

^is new here...

hope you enjoy it...

ndeniche 402 Posting Virtuoso Featured Poster

^is > you

ndeniche 402 Posting Virtuoso Featured Poster

^is in for the next chess tournament

ndeniche 402 Posting Virtuoso Featured Poster

^is right

ndeniche 402 Posting Virtuoso Featured Poster

^reached his 200 posts

ndeniche 402 Posting Virtuoso Featured Poster

^is hilarious

ndeniche 402 Posting Virtuoso Featured Poster

^is like a dude in a chick's body... (in a good way) :P

ndeniche 402 Posting Virtuoso Featured Poster

^has a cool pic from space

ndeniche 402 Posting Virtuoso Featured Poster

i think it would be easier and the same results will be reached if hi truncates the number by dividing it:

#include <iostream>

using namespace std;

int main(){
   int n1,n2,n3;
   cout<<"Input a 7-9 digit number";
   cin>>n3;

1.- the leftmost number (the millions) can be obtained by dividing the whole number by 1,000,000... since the three variables are int, the decimals will be truncated and will be lost... then, multiply this number by 1,000,000 and substract it from the original one... that will get rid of the millions...

n1=n3/1000000;
   n3-=n1*1000000;

2.- for the middle number (the thousands), do the same: divide your resulting number from the last operation by 1,000, then multiply it by 1000 and substract it from the original one...

n2=n3/1000;
   n3-=n2*1000;

3.- the resulting number is your rightmost number(the hundreds).

next: output the number inserting commasbetween them...

cout<<"The number is: "<<n1<<","<<n2<<","<<n3<<endl;
   system("pause");
   return 0;
}

and it gives the same results as the one Hamrick suggested...

ndeniche 402 Posting Virtuoso Featured Poster

you could divide you 7-9 digit number into 3 numbers and place commas between them...

ndeniche 402 Posting Virtuoso Featured Poster

^posts nice thoughts

ndeniche 402 Posting Virtuoso Featured Poster

do i hear dobby?

ndeniche 402 Posting Virtuoso Featured Poster

i bet she does...

ndeniche 402 Posting Virtuoso Featured Poster

^doesn't give a s*** (in a good way)

ndeniche 402 Posting Virtuoso Featured Poster

^is soo good looking... :D

ndeniche 402 Posting Virtuoso Featured Poster

may we see how you structured your Test class?

ndeniche 402 Posting Virtuoso Featured Poster

^is a quick poster

ndeniche 402 Posting Virtuoso Featured Poster

^ is really cute

christina>you commented: aw thanks. :) +21
ndeniche 402 Posting Virtuoso Featured Poster

yup...

ndeniche 402 Posting Virtuoso Featured Poster

In my point of view smokers have to consider the non-smokers. Indeed second hand smoke is harmful. I usually throw my newly lighted cigarretes when is see kids in the area.

that's a good thing to do... though i'd just move somewhere else...

ndeniche 402 Posting Virtuoso Featured Poster

i don't hang out @ the irc and i was extremely boosted...

ndeniche 402 Posting Virtuoso Featured Poster

just write a little prgram that generates 1000 numbers between 10 and 100 using rand() % 100 + 10 to generate the numbers and save them to a file. Then you can write the other program as your teacher instructed.

actually it would be rand()%90 + 10

ndeniche 402 Posting Virtuoso Featured Poster

there is a function in c++ called strlen() which tells you the length of an array... if not, you can use a while loop with a counter that exits when array[i]=='\0'

ndeniche 402 Posting Virtuoso Featured Poster

btw... i'm using DEV... maybe that influenced some errors...

ndeniche 402 Posting Virtuoso Featured Poster

I wish to ask how can permu and input has 4 size when dol is 0 ,1, 2 ,'\0'
because this would mean that it can fit in 4 charecters with null .
then null charecter should be at position 4 i.e permu[4]='\0';
Please correct if I am wrong?

actually, '\0' would be @ permu[3]

ndeniche 402 Posting Virtuoso Featured Poster

my rep was also boosted... my whole rep list is full with Rash saying "a man, a plan a canal... panama!"... i was boosted from 214 to 712 in a blink of an eye... i jumped from 46th place to 6th... right over Ancient Dragon...

i'm not complaining about it... but i'd rather earn my rep, than being given it out randomly...

ndeniche 402 Posting Virtuoso Featured Poster

it's not that hard anyways... all you need are two arrays, and shift the character positions between them... it should go something like this:

#include<iostream>
#include<cstdlib>

using namespace std;

int main(){
    int i=0,j=0;
    char string[100],permut[100],temp;
    gets(string);
    strcpy(permut,string);
    puts(permut);
    i=0;
    getchar();
    while (string[i]!='\0'){
         while (permut[j]!='\0'){
             temp=permut[j];
             permut[j]=permut[i];
             permut[i]=temp;
             puts(permut);
             j++;
         }i++;
    }getchar();
    _exit(0);
    return 0;
}

i think it's enough for a lead start... it doesn't show all the permutations, but the logic you need to use is somewhat like that...

iamthwee commented: Poor, real poor -3
ndeniche 402 Posting Virtuoso Featured Poster

well... not everything...

ndeniche 402 Posting Virtuoso Featured Poster

have you tried it in the compiler? show us the logic you've used...

ndeniche 402 Posting Virtuoso Featured Poster

>>the text equivalent of putting my fingers in my ears and saying "lalalalala!".

lol... i actually laughed when i read that... because it is actually true...

ndeniche 402 Posting Virtuoso Featured Poster

> Smoking is bad for you.
Smoking is good for you, just like chocolate and wine. And just like chocolate and wine, smoking in excess is bad for you.

that's the best comment i've ever heard in my life... omg... seriously...

ndeniche 402 Posting Virtuoso Featured Poster

if you show us how far you have gone, it will be easier for us to help you

ndeniche 402 Posting Virtuoso Featured Poster

the thing could be, making all those people applying for green cards prove they are going to live in america to study or to work with a certificate from a college or something like that, so no one goes through to start from zero, but having a firm start...

ndeniche 402 Posting Virtuoso Featured Poster

i'm getting dizzy already because of the color changing of the multi-quotes...

ndeniche 402 Posting Virtuoso Featured Poster

conclusion:

thank god in Honduras stuff like that will (most likely) never happed... haha!!! hurray for me!!!

for all of those who are being screwed up with this law... haha!!! losers!!!

ndeniche 402 Posting Virtuoso Featured Poster

that's the spirit...

i think everyone here agrees smoking indoors should be illegal right?

ndeniche 402 Posting Virtuoso Featured Poster

hahaha... i like it when Narue adds some fire to discussions...

ndeniche 402 Posting Virtuoso Featured Poster

i guess the title is missing a question mark in the end...

ndeniche 402 Posting Virtuoso Featured Poster

maybe you show us what you have done and we can show you the right way... WE DON'T GIVE HOMEWORK TO THOSE WHO DON'T SHOW ANY EFFORT

we surely can do it... can you?

ndeniche 402 Posting Virtuoso Featured Poster

And naturally you're qualified to make that choice. :icon_rolleyes: Tell me, have you ever thought to ask a smoker not to smoke around you? I have, and to date nobody has ever refused to give me space or put out their cigarette when I asked politely. Most of the time they immediately put it out and don't light up again while I'm around. Smokers aren't evil people who intentionally try to hurt you, so stop trying to act righteous.

thank you very much... i though you would never defend me in any way... :D

and actually, no... we don't mind putting outour cigars when we re making other people uncomfortable... i even make sure to keep my distance to other people that are not smoking when it is possible...

i would say that i wouldn't care if they made it illegal to smoke in restaurants, but that's far from happening here...:P

ndeniche 402 Posting Virtuoso Featured Poster

that is always given... i mean... when you say party animal, immediately you get the picture of alcohol... lol

ndeniche 402 Posting Virtuoso Featured Poster

not equal, but related... even more if you're a showoff...

ndeniche 402 Posting Virtuoso Featured Poster

i don't know... it's somewhat fun to be the showoff party animal... in a moderated way of course...

ndeniche 402 Posting Virtuoso Featured Poster

because they're stupidly funny... not right, but funny... don't you think?

ndeniche 402 Posting Virtuoso Featured Poster

the truth is, i know what i am doing to my body... i am aware that i'm harming myself... i know it is bad for me and for everyone...

next time i guess i'd better team up in the right side... and search for better arguents... :D