hi,
I am suffering a from a problem that when i double click the drive D,E,G,H a window appears 'open with' and drive is not open and Auto is in the top position when i right click any of the drives D,E,G,H. i don't want to open the drive by right clicking the drive every time.surprisingly drive C is not suffering from this problem.I appericiate any comment and answer to resolve this problem.
When i double click the drive a window appear 'open with'?
Right click on the drive, and select properties. The select the Auto Play tab. Chose the option on the bottom thats says take no action, or choose a differnet default action instead if you like.
Another possibillity is that the auto run file pointed to by the auto run file points to a file with an extention that is registered on your system. I.E you don't have the program installed to run the file.
Reply:HI,
poor problem, ur system is suffering from a virus or it is after wards effect of virus clean,
try running regedit.exe, msconfig.exe or task manager, if it starts well then your virus is cleaned up already but effects are left behind.
if they do not start then virus is still live and kicking,
now you can either remove virus by ur self or download any package from norton, trendmicro etc, problem is this virus already knows exe of antiviruses and it wont allow them to start and execute either,
try restarting ur system in safe mode , for that press F8 while restarting the machine to get menu options to start in safe mode,
now in safemode try running msconfig and disable all executable program marked with startup,
restart machine and go for online active scan from Trendmicro, norton, Panda etc,
If the virus is bocking acces to regedit etc and you are sure it is removed, try using HijackThis. It might identify the entries
HijackThis http://www.majorgeeks.com/download3155.h...
1. Please go to My Computer, open your C:\ drive, Select: New %26gt;%26gt; Folder and name the folder HJT.
2. Download HijackThis to the new folder:
3. Double Click on 'HijackThis.zip' to extract and install HijackThis.exe to the new folder.
(If you have downloaded the Self-extracting version of Hijackthis, then it will automatically install in C:\Program Files\HijackThis directory.)
4. Close ALL windows except HJT
5. SCAN with HJT and SAVE LOG. (a notepad window will open with the log in it when you click Save Log) (Ctrl-A to ‘select all', Ctrl-C to 'copy')
6. POST the log a new thread (Ctrl-V to 'paste')
Monday, May 24, 2010
C++ computer programming question 1.please help!?
Write a functiion with double* argument a and int argument length which returns the minimum element in the memory block a.
The following sample task may help:
sample task 1
write a function with a const char* arguments, an int argument length and a character argument c,which which returns the number of characters c in s
int count(const char* s, int length, char c)
{
int i, cnt;
for(i=0, cnt=0; i%26lt; length; ++i)
if(*(s + 1) == c)
++cnt;
return cnt;
}
C++ computer programming question 1.please help!?
//we're assuming length is the number of doubles
//in the memory block, not the number of bytes in
//the memory block. If it's bytes, divide length by
//the sizeof(double)
//which is probably 4
double FindMinimum(double* a, int length)
{
double dLowest = DBL_MAX; //start it at a really big number if DBL_MAX is undefined for you
for(int iIndex = 0; iIndex %26lt; length; iIndex++)
{
if(a[iIndex] %26lt; dLowest)
{
dLowest = a[iIndex];
}
}
return dLowest;
}
The following sample task may help:
sample task 1
write a function with a const char* arguments, an int argument length and a character argument c,which which returns the number of characters c in s
int count(const char* s, int length, char c)
{
int i, cnt;
for(i=0, cnt=0; i%26lt; length; ++i)
if(*(s + 1) == c)
++cnt;
return cnt;
}
C++ computer programming question 1.please help!?
//we're assuming length is the number of doubles
//in the memory block, not the number of bytes in
//the memory block. If it's bytes, divide length by
//the sizeof(double)
//which is probably 4
double FindMinimum(double* a, int length)
{
double dLowest = DBL_MAX; //start it at a really big number if DBL_MAX is undefined for you
for(int iIndex = 0; iIndex %26lt; length; iIndex++)
{
if(a[iIndex] %26lt; dLowest)
{
dLowest = a[iIndex];
}
}
return dLowest;
}
Calculate the double integral of F.ndS?
Calculate the double integral of F.ndS where F = (ax^3)i + (by^3)j +(cz^3)k
(where a, b and c are constants) over the surface of a sphere of radius r centred at the origin
and over the surface of a cylinder of radius r and height 2h centred at the origin with its axis in
the z-direction
Calculate the double integral of F.ndS?
Ok, F = (ax³)i + (by³)j +(cz³)k
The general algorithm to calculate ∫∫F.ndS is to determine:
i) the (possibly piecewise) equation in x,y,z that parameterizes the entire surface
ii) n, the normal vector at each point on that surface. Usually got from the del(gradient) operator on the surface equation from i).
iii) dS, the infinitesimal area of a patch at point (x,y,z) on the surface.
In rectangular/Cartesian coordinates this is:
dS = dx dy / |n . k| (for explanation, see text link below)
or dS = dx dz / |n . j| if you are parameterizing for x,z
For the sphere this may be easier to formulate in spherical coordinates.
iv) finally compute the general value
F.ndS = F.n dx dy / |n . k|
v) and compute the double integral (piecewise if necessary) over the entire surface
SPHERE of radius r:
i) Eqn is: x² + y² + z² = r, i.e F(x,y,z) = x² + y² + z² - r = 0
for -r%26lt;=x%26lt;=r, -r%26lt;=y%26lt;=r
Thus there are two values of z, each has to be considered:
z² = r - x² + y²
z = +/-√(r - x² + y²)
Note: del F(x,y,z) = (2x, 2y, 2z)
ii) n = del F(x,y,z) / | del F(x,y,z) |
= (x,y,z) / r = 1/r (x,y,z)
iii)
dS = dx dy / |n . k|
= dx dy / |(x,y,z) / r . k|
= dx dy / |z/r|
= r dx dy / |z|
iv)
F.n = (ax³,by³,cz³) . 1/r (x,y,z)
= 1/r (ax^4 + by^4 + cz^4)
Then:
F.n dS = 1/r (ax^4 + by^4 + cz^4) * r dx dy / |z|
= (ax^4 + by^4 + cz^4) dx dy / |z|
We can eliminate z for x,y with:
z² = r - x² + y²
z = √(r - x² + y²)
Thus:
F.n dS = (ax^4 + by^4 + c(r - x² + y²)²) / √(r - x² + y²) dx dy
v)
∫∫ F.n dS from x=-r..+r, y=-r..+r
= ∫∫ (ax^4 + by^4 + c(r - x² + y²)²) / √(r - x² + y²) dx dy
= ...
CYLINDER of radius r, height 2h centred at the origin with its axis in the z-direction:
i) Piecewise parameterization is the curved surface, and top and bottom circles.
Curved surface:
F(x,y) = x² + y² = r, z goes from -h to +h
Thus: -h%26lt;=z%26lt;=+h, y = +/- √(r - x²)
F = (x,√(r - x²),z)
Top and bottom circles:
x² + y² %26lt;= r, z= +/-h
So: -r%26lt;=x%26lt;=r, -h%26lt;=z%26lt;=+h
-√(r - x²)%26lt;=y%26lt;=+√(r - x²)
ii) Unit Normal n = del F(x,y,z) / | del F(x,y,z) |
Curved surface: F = (x,√(r - x²),0)
del F = (1, x/√(r - x²),0)
n = (1, x/√(r - x²),0) / | del F(x,y,z) |
n = 1/r (√(r - x²), x,0)
Top circle: n = (0,0,1)
Bottom circle: n =(0,0,-1)
iii)
Curved surface: dS = dx dz / |n . j|
dS = 1/r x dx dz
Top and bottom circles:dS = dx dy / |n . k|
=%26gt; dS = dx dy
iv)
Curved surface:
F.n = (ax³,by³,cz³) . 1/r (√(r - x²), x,0)
= (ax³,b(r - x²)^(3/2),cz³) . 1/r (√(r - x²), x,0)
= 1/r (ax³√(r - x²) + bx(r - x²)^(3/2))
F.n dS = 1/r (ax³√(r - x²) + bx(r - x²)^(3/2)) 1/r x dx dz
F.n dS = 1/r² (ax^4√(r - x²) + bx²(r - x²)^(3/2)) dx dz
Top circle:
F.n dS = (ax³,by³,cz³).(0,0,1) dx dy
F.n dS = cz³ dx dy
etc.
Reply:here's the first one
n=2xi+2yj+2ak/(2r)=x/ri+y/rj+z/rk
∫∫F∙ndxdy=∫∫(ax^3i+by^3+cz^3)∙(x/ri+y/... dx=
∫∫(ax^4i+by^4+cz^4)/r dx dy
replace z with sqrt(r^2-x^2-y^2)
∫∫(ax^4i+by^4+c((r^2-x^2-y^2)^2)dx dy
the limits of integration for
y are -sqrt(r^2-x^2) to sqrt(r^2-x^2) the limits for x are -r to r.
The calculations from here are straightforward.
(where a, b and c are constants) over the surface of a sphere of radius r centred at the origin
and over the surface of a cylinder of radius r and height 2h centred at the origin with its axis in
the z-direction
Calculate the double integral of F.ndS?
Ok, F = (ax³)i + (by³)j +(cz³)k
The general algorithm to calculate ∫∫F.ndS is to determine:
i) the (possibly piecewise) equation in x,y,z that parameterizes the entire surface
ii) n, the normal vector at each point on that surface. Usually got from the del(gradient) operator on the surface equation from i).
iii) dS, the infinitesimal area of a patch at point (x,y,z) on the surface.
In rectangular/Cartesian coordinates this is:
dS = dx dy / |n . k| (for explanation, see text link below)
or dS = dx dz / |n . j| if you are parameterizing for x,z
For the sphere this may be easier to formulate in spherical coordinates.
iv) finally compute the general value
F.ndS = F.n dx dy / |n . k|
v) and compute the double integral (piecewise if necessary) over the entire surface
SPHERE of radius r:
i) Eqn is: x² + y² + z² = r, i.e F(x,y,z) = x² + y² + z² - r = 0
for -r%26lt;=x%26lt;=r, -r%26lt;=y%26lt;=r
Thus there are two values of z, each has to be considered:
z² = r - x² + y²
z = +/-√(r - x² + y²)
Note: del F(x,y,z) = (2x, 2y, 2z)
ii) n = del F(x,y,z) / | del F(x,y,z) |
= (x,y,z) / r = 1/r (x,y,z)
iii)
dS = dx dy / |n . k|
= dx dy / |(x,y,z) / r . k|
= dx dy / |z/r|
= r dx dy / |z|
iv)
F.n = (ax³,by³,cz³) . 1/r (x,y,z)
= 1/r (ax^4 + by^4 + cz^4)
Then:
F.n dS = 1/r (ax^4 + by^4 + cz^4) * r dx dy / |z|
= (ax^4 + by^4 + cz^4) dx dy / |z|
We can eliminate z for x,y with:
z² = r - x² + y²
z = √(r - x² + y²)
Thus:
F.n dS = (ax^4 + by^4 + c(r - x² + y²)²) / √(r - x² + y²) dx dy
v)
∫∫ F.n dS from x=-r..+r, y=-r..+r
= ∫∫ (ax^4 + by^4 + c(r - x² + y²)²) / √(r - x² + y²) dx dy
= ...
CYLINDER of radius r, height 2h centred at the origin with its axis in the z-direction:
i) Piecewise parameterization is the curved surface, and top and bottom circles.
Curved surface:
F(x,y) = x² + y² = r, z goes from -h to +h
Thus: -h%26lt;=z%26lt;=+h, y = +/- √(r - x²)
F = (x,√(r - x²),z)
Top and bottom circles:
x² + y² %26lt;= r, z= +/-h
So: -r%26lt;=x%26lt;=r, -h%26lt;=z%26lt;=+h
-√(r - x²)%26lt;=y%26lt;=+√(r - x²)
ii) Unit Normal n = del F(x,y,z) / | del F(x,y,z) |
Curved surface: F = (x,√(r - x²),0)
del F = (1, x/√(r - x²),0)
n = (1, x/√(r - x²),0) / | del F(x,y,z) |
n = 1/r (√(r - x²), x,0)
Top circle: n = (0,0,1)
Bottom circle: n =(0,0,-1)
iii)
Curved surface: dS = dx dz / |n . j|
dS = 1/r x dx dz
Top and bottom circles:dS = dx dy / |n . k|
=%26gt; dS = dx dy
iv)
Curved surface:
F.n = (ax³,by³,cz³) . 1/r (√(r - x²), x,0)
= (ax³,b(r - x²)^(3/2),cz³) . 1/r (√(r - x²), x,0)
= 1/r (ax³√(r - x²) + bx(r - x²)^(3/2))
F.n dS = 1/r (ax³√(r - x²) + bx(r - x²)^(3/2)) 1/r x dx dz
F.n dS = 1/r² (ax^4√(r - x²) + bx²(r - x²)^(3/2)) dx dz
Top circle:
F.n dS = (ax³,by³,cz³).(0,0,1) dx dy
F.n dS = cz³ dx dy
etc.
Reply:here's the first one
n=2xi+2yj+2ak/(2r)=x/ri+y/rj+z/rk
∫∫F∙ndxdy=∫∫(ax^3i+by^3+cz^3)∙(x/ri+y/... dx=
∫∫(ax^4i+by^4+cz^4)/r dx dy
replace z with sqrt(r^2-x^2-y^2)
∫∫(ax^4i+by^4+c((r^2-x^2-y^2)^2)dx dy
the limits of integration for
y are -sqrt(r^2-x^2) to sqrt(r^2-x^2) the limits for x are -r to r.
The calculations from here are straightforward.
Jamie Lynn Spears 'boyfriend should be prosecuted? is there a double standart?
It makes me sick how this impotent douchebag named Chris Hansen ( from "to catch a predator") ruins the lifes of judgement impaired individuals who fall on a chat room hoax, however, you see how a upper middle class, good looking young men who has sex with a minor gets away with his crime. How many times we see men charged with sex crimes for having sex with underage girls? but it seems like the finger pointing approach of the conservative white America seems to back up when it comes to judge the "Jamie Lynn Spears boyfriend". And please do no come up with that "the baby needs a father" or the "consensual sex" BS 'cause the same thing could have been said about the thounsands of men who are on jail or will have to live with the "sex offendder" tag for the rest of their lifes. That makes me sick, C'mon people lets admit that our american society is full of crap and double standart perspectives. It seems like when you are rich, white and good looking "Mrs law" takes a double look.
Jamie Lynn Spears 'boyfriend should be prosecuted? is there a double standart?
Wait. You think Chris Hansen is doing a bad thing by helping to stop sexual predators? Do you have kids or are you one of the people that like to try to mess around with minors? Have you ever watched an episode of "To Catch a Predator"? They are not all upper/middle-class, good-looking guys. In fact, what you point out is the minority. I thank God this man is out there trying to help. How the hell are child molestors "judgement impaired". They are sick in the head and need serious help. The sad thing is the majority of the population is more concerned about Jamie's personal life and not their own child's or how to get more involved with stopping the sick ****s out there praying on girls/boys that age. Getting off the soap box, all I have to say is they discovered, based on his birthday, that he was 18 when he knocked her up so there was no law broken. I have a feeling with how defensive you are, we will be seeing you on "To Catch a Predator" real soon, if you already haven't been.
Reply:According to the law they havent done anything wrong, read the second article down
http://perezhilton.com/?cat=514
it was also on people magazines website too
Reply:good question.........
if you look to his age you can say yes
if her parents go to the police he has a big problem
bud they started dating when he was under age 18 so that's makes it complicated
Reply:I agree with you as far as because they have money and influence he will prolly not be charged with anything but if he was a "poor nobody" he would be locked up and tagged a sex offender. If out laws are going to charge one person then they should charge everyone equally. My cousin dated a girl for 3 years he was 16 she was 14 when they started dating. they were still together when he turned 18 he joined the army and the girls mom got mad when he came home 2 years later he was arrested and spent a year in jail and is now tagged as a sex offender he can't get a job because of it. Him and the girl who are now 22 and 24 have just had a baby girl last month. I guess my point is charge everyone or no one for the same "offense". And as far a Chris Hansen I have watched that show a few times and alot of it looks like entrapment to me, but I could be wrong like I said I've only watched a few times.
Reply:First of all, where they are within the age of consent and therefore it is not a problem anymore. And I think it's absolutely ludicrous for you to disagree with what Chris Hansen is doing. !4 year old girl or not, what those men are doing is against the law and they know what they are doing. He's trying to get child predators off the streets so no one gets molested and hurt by them. I'm sorry but if it happened to you or your child you would be singing a different tune. You do know in different countries sex offenders are put through worse things than over here. Um like death. So don't knock American Society unless you are ready to say things about other societies. I'm sorry, but you just don't convince me to change my mind on this issue. Your arguement is incrediablly weak.
p.s. you can date if the man is 18 and the girls is not. it's just you are not allowed to have sex with on another. that's what the age of consent laws are about.
Reply:Well I don"t know everything about what happened to Jamie Lynn Spears. Could you please give me more details about what happened? That could help me answer this question better.
Reply:him being under 18 when they started dating has no bearing on the subject. He had sex with an under-age girl, he should be subjected to the law that effects the rest of us.
Reply:Gee whiz, isen't the world of movie stars and actors living in a lawless world? Look at her sis, though, and tell me where she's getting her influence. It takes two to make babies, what was she thinking, duh! She has no morals? No brains? What's up with these two girls, can't handle Hollywood then stay in Louisinana or wherever they're from.
funeral flowers
Jamie Lynn Spears 'boyfriend should be prosecuted? is there a double standart?
Wait. You think Chris Hansen is doing a bad thing by helping to stop sexual predators? Do you have kids or are you one of the people that like to try to mess around with minors? Have you ever watched an episode of "To Catch a Predator"? They are not all upper/middle-class, good-looking guys. In fact, what you point out is the minority. I thank God this man is out there trying to help. How the hell are child molestors "judgement impaired". They are sick in the head and need serious help. The sad thing is the majority of the population is more concerned about Jamie's personal life and not their own child's or how to get more involved with stopping the sick ****s out there praying on girls/boys that age. Getting off the soap box, all I have to say is they discovered, based on his birthday, that he was 18 when he knocked her up so there was no law broken. I have a feeling with how defensive you are, we will be seeing you on "To Catch a Predator" real soon, if you already haven't been.
Reply:According to the law they havent done anything wrong, read the second article down
http://perezhilton.com/?cat=514
it was also on people magazines website too
Reply:good question.........
if you look to his age you can say yes
if her parents go to the police he has a big problem
bud they started dating when he was under age 18 so that's makes it complicated
Reply:I agree with you as far as because they have money and influence he will prolly not be charged with anything but if he was a "poor nobody" he would be locked up and tagged a sex offender. If out laws are going to charge one person then they should charge everyone equally. My cousin dated a girl for 3 years he was 16 she was 14 when they started dating. they were still together when he turned 18 he joined the army and the girls mom got mad when he came home 2 years later he was arrested and spent a year in jail and is now tagged as a sex offender he can't get a job because of it. Him and the girl who are now 22 and 24 have just had a baby girl last month. I guess my point is charge everyone or no one for the same "offense". And as far a Chris Hansen I have watched that show a few times and alot of it looks like entrapment to me, but I could be wrong like I said I've only watched a few times.
Reply:First of all, where they are within the age of consent and therefore it is not a problem anymore. And I think it's absolutely ludicrous for you to disagree with what Chris Hansen is doing. !4 year old girl or not, what those men are doing is against the law and they know what they are doing. He's trying to get child predators off the streets so no one gets molested and hurt by them. I'm sorry but if it happened to you or your child you would be singing a different tune. You do know in different countries sex offenders are put through worse things than over here. Um like death. So don't knock American Society unless you are ready to say things about other societies. I'm sorry, but you just don't convince me to change my mind on this issue. Your arguement is incrediablly weak.
p.s. you can date if the man is 18 and the girls is not. it's just you are not allowed to have sex with on another. that's what the age of consent laws are about.
Reply:Well I don"t know everything about what happened to Jamie Lynn Spears. Could you please give me more details about what happened? That could help me answer this question better.
Reply:him being under 18 when they started dating has no bearing on the subject. He had sex with an under-age girl, he should be subjected to the law that effects the rest of us.
Reply:Gee whiz, isen't the world of movie stars and actors living in a lawless world? Look at her sis, though, and tell me where she's getting her influence. It takes two to make babies, what was she thinking, duh! She has no morals? No brains? What's up with these two girls, can't handle Hollywood then stay in Louisinana or wherever they're from.
funeral flowers
C++ program need help?
/***************************************...
* fuwen xu 05/11/07 switch and looping.cpp *
* This program compute the commissions for the real estate company *
* Input:choice,agent_id,rsp,csp,msp,yesno,... *
* Output:nr,nc, nm,mc,trc,tcc, *
************************************** HISTORY ****************************
* Who Date Description *
**************************************...
* Fuwen Xu 05/11/2007 calculate commissions *
**************************************...
#include %26lt;iostream%26gt;
#include %26lt;iomanip%26gt;
using namespace std;
#define RCR 0.1 /*residential commission rate*/
#define CCR 0.2 /*commercial commission rate*/
#define MCR 0.15 /*multiunt dwelling commission rate*/
int main()
{
int id, /*five digit number ID*/
price, /*selling pricce*/
nr=0, /*number of residential commissions computed*/
nc=0, /*number of commerical commissions computed*/
nm=0, /*number of multiunit commissions computed*/
yesno; /* program loops when = 1*/
double trc=0.0 , /*total of residential commissions*/
tcc=0.0 , /*total of commerical commissions*/
tmc=0.0 ; /*total of multiunit dwelling commissions*/
char choice, /*choose the what category r, c, m*/
space = ' '; /*space*/
cout %26lt;%26lt; "\n\n\n\n";
cout %26lt;%26lt; "\n***************Fuwen Commission Computer******************\n";
cout %26lt;%26lt; "\nDo you have a commission to compute?(1 = yes, 0 = no)? ";
cin %26gt;%26gt; yesno;
while (yesno == 1)
{
cout %26lt;%26lt; "\nPlease enter the Agent ID: ";
cin %26gt;%26gt; id;
cout %26lt;%26lt; "\nPlease enter the category of property sold";
cout %26lt;%26lt; "\n(R = residential, C = commercial, M = multiunit): ";
cin %26gt;%26gt; choice;
switch(choice)
{
case 'r':
case 'R':
trc-=trc;
cout %26lt;%26lt;"Please enter the selling price: ";
cin %26gt;%26gt; price;
trc += (price*RCR);
nr += 1;
cout %26lt;%26lt;"\n\nThe commission for this sale for Agent "%26lt;%26lt;space%26lt;%26lt;id;
cout %26lt;%26lt;" is: "%26lt;%26lt;setw(2)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;trc;
break;
case 'c':
case 'C':
tcc-=tcc;
cout %26lt;%26lt;"Please enter the selling price: ";
cin %26gt;%26gt; price;
tcc += (price*CCR);
nc+=1;
cout %26lt;%26lt;"\n\nThe commission for this sale for Agent "%26lt;%26lt;space%26lt;%26lt;id;
cout %26lt;%26lt;" is: "%26lt;%26lt;setw(2)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tcc;
break;
case 'M':
case 'm':
tmc-=tmc;
cout %26lt;%26lt;"Please enter the selling price: ";
cin %26gt;%26gt; price;
tmc += (price*MCR);
nm+=1;
cout %26lt;%26lt;"\n\nThe commission for this sale for Agent "%26lt;%26lt;space%26lt;%26lt;id;
cout %26lt;%26lt;" is: "%26lt;%26lt;setw(2)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tmc;
break;
default:
cout %26lt;%26lt; "\nAn invalid value was entered.\n";
}
cout %26lt;%26lt; "\n\n";
cout %26lt;%26lt; "\nDo you have another commission to compute?(1 = yes,0 = no)? ";
cin %26gt;%26gt; yesno;
}
trc+=trc;
tcc+=tcc;
tmc+=tmc;
cout %26lt;%26lt; "\n\n********************End of Run Report************************";
cout %26lt;%26lt; "\n\nTotal number of Residential commissions computed = "%26lt;%26lt;nr;
cout %26lt;%26lt; "\nTotal number of Commercial commissions computed = "%26lt;%26lt;nc;
cout %26lt;%26lt; "\nTotal number of Multiunit commissions computed = "%26lt;%26lt;nm;
cout %26lt;%26lt; "\nTotal number of all commissions computed = "%26lt;%26lt;(nr+nc+nm);
cout %26lt;%26lt; "\n\nTotal amount of Redidential commissions computed = "%26lt;%26lt;setw(9)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tr...
cout %26lt;%26lt; "\nTotal amount of Commercial commissions computed = " %26lt;%26lt;setw(9)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tcc;
cout %26lt;%26lt; "\nTotal amount of Multiunit commissions computed = "%26lt;%26lt;setw(9)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tm...
cout %26lt;%26lt; "\n\nTotal amount of all commissions computed = "%26lt;%26lt;" $ "%26lt;%26lt;setw(12)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;(tr...
cout %26lt;%26lt; "\n";
return 0;
}
C++ program need help?
Your code doesn't keep an accurate total count of sales. For example, for switch case r/R you have trc-=trc, basically setting trc = 0 EVERY TIME switch case r/R is run. So the count is essentially wiped out all the time and when you're done the count isn't correct.
Reply:BigRez,
who says u to "cut" and "paste".
if u know the answer then
just "select" and"copy" then "paste" to C++.
Sorry i can't anser to question b/c i am C student not C++.
Reply:Well, what's the problem?
(You're better off telling us the problem is than just posting the code. When we see the code, Y!Answers will truncate long lines so we can't just cut and paste it into our compilers.)
Reply:Err, whats your question?
* fuwen xu 05/11/07 switch and looping.cpp *
* This program compute the commissions for the real estate company *
* Input:choice,agent_id,rsp,csp,msp,yesno,... *
* Output:nr,nc, nm,mc,trc,tcc, *
************************************** HISTORY ****************************
* Who Date Description *
**************************************...
* Fuwen Xu 05/11/2007 calculate commissions *
**************************************...
#include %26lt;iostream%26gt;
#include %26lt;iomanip%26gt;
using namespace std;
#define RCR 0.1 /*residential commission rate*/
#define CCR 0.2 /*commercial commission rate*/
#define MCR 0.15 /*multiunt dwelling commission rate*/
int main()
{
int id, /*five digit number ID*/
price, /*selling pricce*/
nr=0, /*number of residential commissions computed*/
nc=0, /*number of commerical commissions computed*/
nm=0, /*number of multiunit commissions computed*/
yesno; /* program loops when = 1*/
double trc=0.0 , /*total of residential commissions*/
tcc=0.0 , /*total of commerical commissions*/
tmc=0.0 ; /*total of multiunit dwelling commissions*/
char choice, /*choose the what category r, c, m*/
space = ' '; /*space*/
cout %26lt;%26lt; "\n\n\n\n";
cout %26lt;%26lt; "\n***************Fuwen Commission Computer******************\n";
cout %26lt;%26lt; "\nDo you have a commission to compute?(1 = yes, 0 = no)? ";
cin %26gt;%26gt; yesno;
while (yesno == 1)
{
cout %26lt;%26lt; "\nPlease enter the Agent ID: ";
cin %26gt;%26gt; id;
cout %26lt;%26lt; "\nPlease enter the category of property sold";
cout %26lt;%26lt; "\n(R = residential, C = commercial, M = multiunit): ";
cin %26gt;%26gt; choice;
switch(choice)
{
case 'r':
case 'R':
trc-=trc;
cout %26lt;%26lt;"Please enter the selling price: ";
cin %26gt;%26gt; price;
trc += (price*RCR);
nr += 1;
cout %26lt;%26lt;"\n\nThe commission for this sale for Agent "%26lt;%26lt;space%26lt;%26lt;id;
cout %26lt;%26lt;" is: "%26lt;%26lt;setw(2)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;trc;
break;
case 'c':
case 'C':
tcc-=tcc;
cout %26lt;%26lt;"Please enter the selling price: ";
cin %26gt;%26gt; price;
tcc += (price*CCR);
nc+=1;
cout %26lt;%26lt;"\n\nThe commission for this sale for Agent "%26lt;%26lt;space%26lt;%26lt;id;
cout %26lt;%26lt;" is: "%26lt;%26lt;setw(2)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tcc;
break;
case 'M':
case 'm':
tmc-=tmc;
cout %26lt;%26lt;"Please enter the selling price: ";
cin %26gt;%26gt; price;
tmc += (price*MCR);
nm+=1;
cout %26lt;%26lt;"\n\nThe commission for this sale for Agent "%26lt;%26lt;space%26lt;%26lt;id;
cout %26lt;%26lt;" is: "%26lt;%26lt;setw(2)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tmc;
break;
default:
cout %26lt;%26lt; "\nAn invalid value was entered.\n";
}
cout %26lt;%26lt; "\n\n";
cout %26lt;%26lt; "\nDo you have another commission to compute?(1 = yes,0 = no)? ";
cin %26gt;%26gt; yesno;
}
trc+=trc;
tcc+=tcc;
tmc+=tmc;
cout %26lt;%26lt; "\n\n********************End of Run Report************************";
cout %26lt;%26lt; "\n\nTotal number of Residential commissions computed = "%26lt;%26lt;nr;
cout %26lt;%26lt; "\nTotal number of Commercial commissions computed = "%26lt;%26lt;nc;
cout %26lt;%26lt; "\nTotal number of Multiunit commissions computed = "%26lt;%26lt;nm;
cout %26lt;%26lt; "\nTotal number of all commissions computed = "%26lt;%26lt;(nr+nc+nm);
cout %26lt;%26lt; "\n\nTotal amount of Redidential commissions computed = "%26lt;%26lt;setw(9)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tr...
cout %26lt;%26lt; "\nTotal amount of Commercial commissions computed = " %26lt;%26lt;setw(9)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tcc;
cout %26lt;%26lt; "\nTotal amount of Multiunit commissions computed = "%26lt;%26lt;setw(9)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;tm...
cout %26lt;%26lt; "\n\nTotal amount of all commissions computed = "%26lt;%26lt;" $ "%26lt;%26lt;setw(12)%26lt;%26lt;fixed%26lt;%26lt;setprecision(2)%26lt;%26lt;(tr...
cout %26lt;%26lt; "\n";
return 0;
}
C++ program need help?
Your code doesn't keep an accurate total count of sales. For example, for switch case r/R you have trc-=trc, basically setting trc = 0 EVERY TIME switch case r/R is run. So the count is essentially wiped out all the time and when you're done the count isn't correct.
Reply:BigRez,
who says u to "cut" and "paste".
if u know the answer then
just "select" and"copy" then "paste" to C++.
Sorry i can't anser to question b/c i am C student not C++.
Reply:Well, what's the problem?
(You're better off telling us the problem is than just posting the code. When we see the code, Y!Answers will truncate long lines so we can't just cut and paste it into our compilers.)
Reply:Err, whats your question?
I had an u/s done and they didn't see anything, my HCG is low but doubling, I had a m/c last month, what's up?
I miscarried on November 1st. I got a positive hpt on 12/5, my hcg level was 11 on 12/5. Is it to early to see anything on an ultrasound? Are my levels too low? Is it possible that I am not as pregnant as my last mensus( miscarriage) would predict I am?
I had an u/s done and they didn't see anything, my HCG is low but doubling, I had a m/c last month, what's up?
With abortion, as well as miscarriage, it's normal to test positive for a month or two until you get back on your period and your body stops producing the hormone. I would wait a few weeks or so to know for sure. I know personally how difficult it is to deal with the loss of a child, and I used to hope that it didn't really happen, or that I would still be pregnant. Just hang in there. You might go and see a doctor too and discuss the possibilities.
Reply:I would wait and go back to the doctor. It may be too early to tell. If the hcg is doubling as it should, then when you go back to the doctor it should be higher. We miscarried Aug. 22. I found out I was pregnant again on Sept 19th. By then I was only like 2 weeks along, and your hcg level is not very high. I went to the doctor a couple weeks after that and everything was okay. I didn't have my first u/s until like 7weeks and I only knew it was that far from the u/s since I never actually had a period in between miscarriage and conception. Just wait it out take care of yourself, take your vitamins, drink lots of h20, no caffiene or junk food and take my advice bulk up on the fiber.
Good luck
Reply:You're probably just barely pregnant, they cant see anything in most cases until 6-8 weeks into a pregnancy, and your levels, although doubling, indicate you're too soon for that.
I had an u/s done and they didn't see anything, my HCG is low but doubling, I had a m/c last month, what's up?
With abortion, as well as miscarriage, it's normal to test positive for a month or two until you get back on your period and your body stops producing the hormone. I would wait a few weeks or so to know for sure. I know personally how difficult it is to deal with the loss of a child, and I used to hope that it didn't really happen, or that I would still be pregnant. Just hang in there. You might go and see a doctor too and discuss the possibilities.
Reply:I would wait and go back to the doctor. It may be too early to tell. If the hcg is doubling as it should, then when you go back to the doctor it should be higher. We miscarried Aug. 22. I found out I was pregnant again on Sept 19th. By then I was only like 2 weeks along, and your hcg level is not very high. I went to the doctor a couple weeks after that and everything was okay. I didn't have my first u/s until like 7weeks and I only knew it was that far from the u/s since I never actually had a period in between miscarriage and conception. Just wait it out take care of yourself, take your vitamins, drink lots of h20, no caffiene or junk food and take my advice bulk up on the fiber.
Good luck
Reply:You're probably just barely pregnant, they cant see anything in most cases until 6-8 weeks into a pregnancy, and your levels, although doubling, indicate you're too soon for that.
Would thieves steel a no-name double din car dvd player?
Recently there have been a series of break-ins in our condo underground parking lot and they have broken into new BMWs, Lexus', and Acuras taking their factory navigation systems despite all the fancy alarms.
I have a double-din slot and in light of what's happened if I do opt with a double din dvd player I want to purchase a no-name ebay brand to deter any attraction.
My question is: will a potential thief know that my system is a piece of junk or will it be like "oh, a double din dvd-let's take it!"? The only other option I have really is to purchase a single din with detachable panel. And please don't tell me to upgrade my factory alarm system b/c it's obviously not working in my building. I'd rather sleep soundly knowing that these guys will be smart enough to know that my system has no street value.
Would thieves steel a no-name double din car dvd player?
dark tint depending on if its not illegal in your neck of the woods, and you can upgrade your alarm system, there a alarms out there that will page you when your alarm goes off (you could call the police, or respond with your gun) and on the pager it will also show what door or window set it off (installed for under $200), it does not matter about the name brand because when looking thru a window you cant see that anyways
Reply:It doesn't matter what the value is thieving scum will take it no matter what, why not try CCTV you can get them really cheap now.
Reply:if it costs money, they will jack it
people jack anything
it sucks
get dark tint like that person said
park by a light or something
Reply:jack asses will take anythin...wether it was free for u or not....cos the way they see it, it is always free and anything free is good...so do urselff a favour and get an alarm system or put a security lock code on ur stuff...
Reply:you can get a no brand name it might work but also get some dark tint so that they cant see inside your car
I have a double-din slot and in light of what's happened if I do opt with a double din dvd player I want to purchase a no-name ebay brand to deter any attraction.
My question is: will a potential thief know that my system is a piece of junk or will it be like "oh, a double din dvd-let's take it!"? The only other option I have really is to purchase a single din with detachable panel. And please don't tell me to upgrade my factory alarm system b/c it's obviously not working in my building. I'd rather sleep soundly knowing that these guys will be smart enough to know that my system has no street value.
Would thieves steel a no-name double din car dvd player?
dark tint depending on if its not illegal in your neck of the woods, and you can upgrade your alarm system, there a alarms out there that will page you when your alarm goes off (you could call the police, or respond with your gun) and on the pager it will also show what door or window set it off (installed for under $200), it does not matter about the name brand because when looking thru a window you cant see that anyways
Reply:It doesn't matter what the value is thieving scum will take it no matter what, why not try CCTV you can get them really cheap now.
Reply:if it costs money, they will jack it
people jack anything
it sucks
get dark tint like that person said
park by a light or something
Reply:jack asses will take anythin...wether it was free for u or not....cos the way they see it, it is always free and anything free is good...so do urselff a favour and get an alarm system or put a security lock code on ur stuff...
Reply:you can get a no brand name it might work but also get some dark tint so that they cant see inside your car
Subscribe to:
Posts (Atom)