Monday, May 24, 2010

Why this c program is going infinite!!!!!!?

Program is to find no. of days between 2 dates.Logic is to add 1 day to 1 date till it reaches other.


#include%26lt;stdio.h%26gt;


#include%26lt;conio.h%26gt;


void main()


{


int a,b,c,d,e,f,flag=0;


printf("Enter first date");


scanf("%d%d%d",%26amp;a,%26amp;b,%26amp;c);


printf("Enter second date");


scanf("%d%d%d",%26amp;d,%26amp;e,%26amp;f);





while(c!=f||b!=e||a!=d) //If I comment c!=f this program works otherwise it goes infinite!





{


a++;


if((b==4)||(b==6)||(b==9)||(b==11))


f=30;


else if(b==2)


{


if(d%4==0)


f=29;


else


f=28;


}


else


f=31;


if(a%26gt;f)


{


b++;


a=1;


}


if(b==13)


{


c++;


b=1;


}


flag++;





}


printf("%d",flag);


getch();


}

Why this c program is going infinite!!!!!!?
Why don't you first calculate the julian value and then just subtract the two dates?





For example, if they enter 2007 01 31 for the first date and


2007 02 10 for the second, the first date would calculate to 2007031 and the second is 2007041. Subtracting, you then get 10 days.





The following hasn't been compiled or checked for complete accuracy, but should give an idea.








int main() {


int date1, date2, daysDiff=0;


/* blah blah blah - get your dates... */





date1 = jetJulian (a,b,c);


date2 = jetJulian (d,e,f);





if (date1%26lt;date2)


daysDiff = date2-date1;


else


daysDiff = date1-date2;





}





int getJulian(int year, int mo, int day) {


int jValue=0;


int moDays[11]={0,31,59,90,120,150,181,212,2...


/* Double-check the values above :) */





/* Add some verifications prior to the following */


jValue = moDays[mo-1]+day;





/* Add one if the mo%26gt;2 and leap year */


if ((year%4 %26amp;%26amp; !year%100) || year%400)


jValue++;





jValue+= year*1000;


return jValue;


}
Reply:i did this program


its to find persons age


%26amp; hw many days he lived


its very simple


first u substracted the old year from recent year


than answer*365


other line


subtract large month to smaller 1


than answer*30


than just add the days


ok that was mine


i wont do ur prob


i might get answer 2moro


when i go to my class


How should I learn C#.net? My background is C/C++?

Hello, I am from the old-school C/C++ generation and have seen the C#.net arrive quite fast. Now it seems like everyone wants a C#.net developper. How did you learn this? Any good resource links? Books? I graduated just before the advent of C# and am quite clueless as how to approach this topic. Thanks in advance. I have MS Visual Studio.net 2003 vers 7.1

How should I learn C#.net? My background is C/C++?
If you are fairly proficent with C++ you should not have any problems getting started on C#.





I havent read any book for learning C#. The language specification and gotdotnet should get you upto speed.
Reply:Basically, changing from C/C++ to .net is easy. Because newer versions usually means easier to use. Besides, the .net help files (MSDN) is a great source of knowledge, tips, and samples.





So don't worry. I suggest you keep a reference book with you all the time, and go right into developing your application. When you face a problem which you don't know how to solve, search first in the .net MSDN, then either in the book or in the net for solution only for that one problem.





Just remember, BE VERY FOCUS. Take one problem at a time. Very soon, in a month or two, you will get used to it. Good luck.
Reply:Just one thing that I find important: C# is _not_ a new version of C or C++ as someone here stated. It is a language of its own, that's very familiar in syntax to C and C++ users.


Microsoft also has C++.NET which basically consists of .NET Framework extensions for C++.


And you can see yet another point here: if you're proficient with C++ there is no need for you to move to C#. The C++ syntax for .NET references and scope notation is somehow funny but easy to understand.

baseball cards

C? what does scanf does? Wich one is used for hardware? c or c++?

what is the difference between c and c++





wich one is easier??





wich one is used more often?

C? what does scanf does? Wich one is used for hardware? c or c++?
First, scanf is used to read value the user types at the command prompt. For example:





int someNumber;


scanf ("%d",%26amp;someNumber);





would wait for the user to type something and press [ENTER]. It would then try to parse the text that was typed into an integer value and place that value in the "someNumber" variable, assuming they typed a valid number.





Either language can be used to interact with hardware, however I myself have never tried to do any sort of embeded systems programing -- I mean all I've worked with is writing relatively simple programs that run on Windows.





C++ adds Object Oriented abilities to the C programming language while still aiming for 100% backwards-compatability with C. And from what I've read it comes pretty close to 100%, however I've never really tried to compile any even remotely complex C program on a C++ compiler.





Anything you learn to do in C will definitely be helpful in learning C++, so if you're looking for what is easiest, you could start by learning C and then moving on to C++.





From what I could find on the Internet, C is more widely used than C++ , but that's probably hard to gauge.
Reply:c++ is object oriented. C can be considered as an earlier version and also a subset of C++. So C is easier. Onhardware C is generaly used.
Reply:In C language (and it can be used in C++) the scanf function is used to accept input from a device, like a keyboard. For example:


char string[80];


scanf("%s", string);


This code will pause the program and wait for the user to enter a series of characters followed by the enter key. In C++ the same thing is usually done using the "cin" function. Like:


cin %26gt;%26gt; string;


The scanf will work in C++ and C. The cin will only work in C++.





C was a language developed for procedural coding, though you can produce something like OO code in C. C++ was designed to be more Object Oriented than C, but it doesn't enforce OO design techniques. Neither one is really better for hardware.





Currently, C++ is preferred over C due to it's OO capacity, but it is not necessarily easier. If you understand OO concepts, C++ would not be more difficult than C. If you don't understand OO, I would probably advise you to learn a little bit about it and use C++.





I'm not a C++ or OO bigot. I'm just expressing my opinion based on my experiences. Good luck!
Reply:Your title doesn't make a lot of sense but I will try to answer your question. scanf() is a function in the stdio.h library that scans input from standard in (usually keyboard).





C is a subset of C++. C++ includes all the libraries of C. The difference is that C++ includes Object Oriented Design (classes), C does not.





Which one is easier is a very subjective question. I learned C before I learned C++, and I personally would recommend C first. The main reason is that in C++ a lot of things are done behind the scenes and you wont have a thorough understanding of C++ without C.





Both C and C++ are used extensively. For anything where speed is key unless you understand C++ well, C is a good choice. Otherwise C++ is usually easier.


C# over C++?

Why do people say C# is better then C++? Also is there still a need for C?





- Cheers, Daniel

C# over C++?
It really depends on what area of application you trying to implement.





For example, I will agree, C# is better, if you are doing development for windows or web based application, as it is truly object oriented and the code is easier to understand. And there is no pointer in C#.





As for C, I think it is still very important and useful in hardware programming, meaning, hardware level kind of work.





If you are a boss, you would invest in C#, rather than C++ as the number of expert in C++ is not growing and you will find more people holding skills in C#, so when come to hiring, you may have a hard time looking for such resource, and it will be higher cost in terms of salary because of the tight supply of C++ programmers.





I suggest, for C++ programmers start to adopt another new modern programming language to ensure a smooth way ahead. Cause, the work for C++ programmers is getting lesser and mostly for hardware programming.





So for those in hardware programing, I think still quite ok to hold on, on C or C++.
Reply:C# is better than C++ because (although it has a minimal performance hit ,of being managed code against native code) it runs in a virtual machine (.Net CLR) and invulnerable to the buffer overflow (root of almost all worms and trojans) and similar attacks. .Net framework provides a very easy access to many APIs using centralized System. and Microsoft. namespaces. ALso the code is write once run everywhere like java, all you need is to port the CLR. (i.e. there is open source MONO, GNU .NET and ROTOR which runs compiled .Net code on linux.





Yes, there is still need for C as most OS kernels (Windows, Linux) are written in C (not C++) thus the drivers written for those OS need to be written in C. Also many lightweight hardware platforms like microcontrollers don't have enough resources to support C++ and OO.





Loren Soth
Reply:As a firmware developer I can state that C/C++ programmers are still VERY much in demand, in fact if anyone knows of a Linux C++ programmer in the Denver area that needs work, contact ADIC out of Englewood! We are looking for good people!





This will probably always be the case since new hardware is constantly being developed and C is the de-facto standard for systems programming. The Linux kernel is written in C and so are most kernels that I can think of. Anyone who thinks that the world revolves around C# is only a application developer and takes for granted all the underlying systems and device drivers that they make use of.





C# is great for Windows application programming, or so I hear. Being strictly a Unix/Linux/VxWorks developer I can tell you that there is no place for C# in my world...only for C++ and C.


What does 'c/c' mean in construction?

Im studying construction technology and have been reading from a book that describes some things as c/c. For example:





100 by 50 ceiling joists at 400 c/c





help much appreciated thanks

What does 'c/c' mean in construction?
it means the measurment from the center of one joist to center of the adjacent joist(s), assumed to be evenly spaced across the space. Also called O.C. sometimes, or On Center. In the US, you might see that as 16" O.C.
Reply:center to center


Prove that the area A ( a, b, c ) of the triangle in the complex plane with corners at a, b, c?

Prove that the area A ( a, b, c ) of the triangle in the complex plane with corners at a, b, c


must be C (Complex), ordered in anti-clockwise fashion, is given by the formula








A ( a, b, c ) = (i/4)( ab` - a`b + b c `- b`c + c a` - c`a ) .


--------------------------------------...





(for the letters a` , b`,c` , it is actually a line on top of these letters)

Prove that the area A ( a, b, c ) of the triangle in the complex plane with corners at a, b, c?
a(a1+ia2), b(b1+ib2), a' denoting the conjugate of a,


then:


ab' = a1b1+a2b2 + i(a2b1-a1b2)


a'b = a1b1+a2b2 + i(a1b2-a2b1)


ab'-ab' = 2i(a2b1-a1b2).





Now from plane geometry you have the formula:


for area of A(a1,a2) B(b1,b2) c(c1,c2)


(ABC ordered clockwise)





Area = ½ (a1b2-a2b1) + ½(b1c2-b2c1) + ½(c1a2-c2a1)





This gives the key I hope

artificial flowers

C-section needed! any advice? please nov15th is the day?

ok well its been a long road for me in my pregnancy i have way way passed my pregnancy time line i was supposed to have a very early delivery but instead god was with us and we hung in there now im 37 weeks pregnant and am having a c-section on November 15th i will be 39 weeks just when i had my son now im needing a c-section for possibal problems so my question is whats a c-section like whats going to happen? my baby is breech and will not turn and is to big to turn and there just alot of other risks right now so a c-section is very needed and i have no clue on what happenes im looking for good or bad problems or experiences im scared and waiting for the day and trying to prepare the best way i can any advice? i also have a 5 year old...how active will i be or not be after this surgery in any ones point of view please let me know!~thanks a million a anxious mommy~

C-section needed! any advice? please nov15th is the day?
Where I work, we have you come in 2 hours before your surgery. We start an IV, begin infusing IV fluids, do lots of paperwork, shave the bottom of your abdomen, and we give preop meds about 30 minutes prior. The anesthiologist should see you ahead of time too. Once we take you to the OR, we have you sit on the side of the stretcher with your back to the anesthiologist for your spinal. They have you sit kind of hunched over, with your spine curved outward, inject some numbing medication to numb the area, then insert the spinal needle. Through that needle they give you the medicine that numbs you from your upper abdomen and below. You lay back, and then we insert the foley catheter. We prep your belly with betadine and you are draped. We then let your significant other in the room. The Dr. will test you before beginning to make sure you are good and numb before starting. Normally they have the baby out within 10 minutes. You'll feel pulling and tugging and pressure but shouldn't be too painful. After nursery checks the baby out and suctions the lungs if needed they'll let you see the baby, then we let the father carry the baby out to the nursery. Once the dr finishes sewing you back up, you go to recovery for an hour or two. You normally get to see the baby while in recovery. You'll stay in the bed for the most part that day. The next morning, we take out your catheter and let you get up to the shower. You are able to walk around some if you feel up to it. We let you go home after 3 days, so you would probably go home on Nov. 18th. You'll become more active over the next few weeks but you shouldn't lift your 5 year old. Instead, sit down and let him/her sit in your lap. Also, no driving for 2 weeks. Most drs will give you a pain pill prescription to take home for the soreness. Hopefully you'll have someone to stay with you for the first few weeks to help you so you'll be able to rest. Good luck. If I left anything out, let me know.
Reply:Unless it is an emergency, you will remain awake for the entire thing.


You need to fast the day before .You will have an IV put in and a catheter in your bladder.You will then have an epidural and then your husband will be able to join you in the OR.


There is a sheet in front of your face so you cannot see what is going on.


It all goes pretty fast , then you will go back to your room.


I suggest resting the rest of that day and keeping your 5 yr old at home.


You should check your insurance [ if in the US ] and find out how long you have in the hospital.


You really should be fine.It takes a while to heal and can be very painful.You will need help the first couple of weeks as you continue to recover.


Congratulations.
Reply:I had one abdominal surgery (with an ectopic) and a c-section 5 years later and at first it is difficult to move at all - even with medication - but the faster you get up and move the better. Walking is difficult but not impossible. After I got home from the hospital I was alone at home and was taking walks (short walks that is) with my baby at two weeks. The first time I recovered faster and was driving at two weeks. My baby was 10 pounds when I brought her home and lifting her was actually easier from a standing position. As far as preparing - make sure you have very comfortable pants or skirts and underwear to wear after you have the surgery and for a while after you go home. The only complication I had was with my c-section because my stomach was so large (from having a 10 pound baby) that my incision got a small infection in it from the sweat and skin hanging over. But other than that I totally enjoyed the birth since I wasn't having labor pains, the pressure of being pregnant was off (as the spinal cut all the feeling to my lower body), and I was calm. Everyone has a different experience but it's what you make it also. Enjoy that new baby and try and remember to take it slow if you need to. Ask a family member or friend to help out for the first couple days at home - that helps! I plan on having more support this time around.
Reply:I had an emergency one because my son was breech too. Only they told me he was ready to go and upside down at the last appointment a day earlier so I was in labor for 6 hours before they realized something wasn't right.





I think having it planned would make me way less nervous then having to sign a waiver in between contractions that they were trying to stop after inducing them. I remember they pull you out of bed the next day and make you walk and I thought I was going to break in half it hurt so bad. They give you this drip of morphine which makes you tired and takes the edge off but it still hurts. I couldn't believe all they send you off with is super size motrin. Taking a shower was also excruciating. I don't ahve a regular birth to compare it too but I imagine it can't be half as bad as this was judging by the recovery time and how people compare it. I was exhausted as it is major surgery. The nurses discouraged breastfeeding because they said I had to heal. I pursued it though for 4 1/2 months. You will need lots of help. My mom and husband took 2 weeks off as I was pretty incompetent minus the feedings laying down in bed. No stairs, lifting or driving. It's a lot to get used to at once. Your hormones are changing, you're recovering from major surgery, you have this baby who wants to eat every couple of hours despite your exhaustion etc. You'll be fine though. My friend just had one in September and wasn't in the agony I was. They say the better shape you're in, the more it hurts because they're cutting through that much more muscle. Needless to say, I am not exercising that much this time around. Good luck!
Reply:Your doctor will do what is best for you and your baby. Try not to worry about it. I know it is a bit of hell to go through but you will have a beautiful baby.





With a c-section, the anaesthetict gives you a spinal epidural on your back, so your lower body is asleep.


The doctors cut your tummy and take the baby out. The cord is cut.


Baby is checked over.


Your tummy is stitched up. You will feel all druggy but really happy your baby is okay.


You will be given drugs to help the pain. The nurses will help you with your baby eg. feeding, changing nappies etc.





Basically you can't drive for 6 weeks, no heavy lifting, no running around with your 5 year old.





A c-section is an operation, your don't want the stitches to come out or get an wound infection.





Ask your family and friends for help and support you will need it.





I feel for you as I have been there. Be strong and good luck!
Reply:I'm Hmong and if you know anyone how is an elder hmong person you can have them turn your baby around so you don't need to have a c- section. I've never had one before but from what I've heard after your c section you can't really do much my best advice to you is if you know any hmong friends or anyone knows one have your baby turn. It really works, hmong people has many ways that people just don't know. like with medicine to many other things but it will cost you money to have them turn your baby.
Reply:Not much happens before the surgery, you just can't have anything to eat or drink for 12 hours before.


When they put you out for the surgery they use as little as they can so as to not harm the baby. They make the cut and have the baby out in like one minute. It is real fast.


As soon as you wake up you get to see or hold the baby. If everyone is doing ok.


If they are doing the bikini cut (which is standard now) you will have a faster recovery than if they do the up and down cut.


Everything is mostly the same as a regular delivery except for the cut. That should he healed in a couple weeks. The first week you are pretty sore and stiff and should have help with your son so he don't jump on you or something.
Reply:mine was emergency so i didnt have time to prepare all tehy did was give me the epidural then lay me right down on the table the dr. came in and i felt some pressure where he was working but other than that nothing i did freak out and try to climb off the table ( obviously i couldnt but still ) due to reaction with valume. After they say you shouldnt want to walk for atleast a day or 2 i was up the next day ( had motivation though my daughter was in another hospital than i was ) you stay in for like 4 days or so you must have a bm and take a shower to leave it is painfull i loved my meds. and usually you carry a pillow or something to keep your stomach in when i came home i had a velcro belt that kept my clothes from catching my scar. I thought it was ok and hopeing i can have another one this time. the only thing i wasnt prepared for was you will have little to no feeling around the scar ( about 3 inches for me ) and that lasts awhile mine was 2 yrs ago and still nothing. dont worry so much youll be fine and relax and take advantage of any help you can get. good luck
Reply:I agree with much of what was said before. However, I found the recovery time to be longer. It was two weeks before I could walk across the house comfortably, and that was with pain medication. After about a month I could walk around well enough to take care of regular household chores.





If you'd like to try to avoid a c-section, there are some things you can try. I had an external version which was unsuccessful. I did not find it to be painful or uncomfortable. Some other people have had success with moxibustion from an acupuncturist or special adjustments from a chiropractor. My baby came early, so I ran out of time to try the last two.


What does 'c/c' mean in construction?

Im studying construction technology and have been reading from a book that describes some things as c/c. For example:





100 by 50 ceiling joists at 400 c/c





help much appreciated thanks

What does 'c/c' mean in construction?
it means the measurment from the center of one joist to center of the adjacent joist(s), assumed to be evenly spaced across the space. Also called O.C. sometimes, or On Center. In the US, you might see that as 16" O.C.
Reply:center to center


Prove that the area A ( a, b, c ) of the triangle in the complex plane with corners at a, b, c?

Prove that the area A ( a, b, c ) of the triangle in the complex plane with corners at a, b, c


must be C (Complex), ordered in anti-clockwise fashion, is given by the formula








A ( a, b, c ) = (i/4)( ab` - a`b + b c `- b`c + c a` - c`a ) .


--------------------------------------...





(for the letters a` , b`,c` , it is actually a line on top of these letters)

Prove that the area A ( a, b, c ) of the triangle in the complex plane with corners at a, b, c?
a(a1+ia2), b(b1+ib2), a' denoting the conjugate of a,


then:


ab' = a1b1+a2b2 + i(a2b1-a1b2)


a'b = a1b1+a2b2 + i(a1b2-a2b1)


ab'-ab' = 2i(a2b1-a1b2).





Now from plane geometry you have the formula:


for area of A(a1,a2) B(b1,b2) c(c1,c2)


(ABC ordered clockwise)





Area = ½ (a1b2-a2b1) + ½(b1c2-b2c1) + ½(c1a2-c2a1)





This gives the key I hope


C-section needed! any advice? please nov15th is the day?

ok well its been a long road for me in my pregnancy i have way way passed my pregnancy time line i was supposed to have a very early delivery but instead god was with us and we hung in there now im 37 weeks pregnant and am having a c-section on November 15th i will be 39 weeks just when i had my son now im needing a c-section for possibal problems so my question is whats a c-section like whats going to happen? my baby is breech and will not turn and is to big to turn and there just alot of other risks right now so a c-section is very needed and i have no clue on what happenes im looking for good or bad problems or experiences im scared and waiting for the day and trying to prepare the best way i can any advice? i also have a 5 year old...how active will i be or not be after this surgery in any ones point of view please let me know!~thanks a million a anxious mommy~

C-section needed! any advice? please nov15th is the day?
Where I work, we have you come in 2 hours before your surgery. We start an IV, begin infusing IV fluids, do lots of paperwork, shave the bottom of your abdomen, and we give preop meds about 30 minutes prior. The anesthiologist should see you ahead of time too. Once we take you to the OR, we have you sit on the side of the stretcher with your back to the anesthiologist for your spinal. They have you sit kind of hunched over, with your spine curved outward, inject some numbing medication to numb the area, then insert the spinal needle. Through that needle they give you the medicine that numbs you from your upper abdomen and below. You lay back, and then we insert the foley catheter. We prep your belly with betadine and you are draped. We then let your significant other in the room. The Dr. will test you before beginning to make sure you are good and numb before starting. Normally they have the baby out within 10 minutes. You'll feel pulling and tugging and pressure but shouldn't be too painful. After nursery checks the baby out and suctions the lungs if needed they'll let you see the baby, then we let the father carry the baby out to the nursery. Once the dr finishes sewing you back up, you go to recovery for an hour or two. You normally get to see the baby while in recovery. You'll stay in the bed for the most part that day. The next morning, we take out your catheter and let you get up to the shower. You are able to walk around some if you feel up to it. We let you go home after 3 days, so you would probably go home on Nov. 18th. You'll become more active over the next few weeks but you shouldn't lift your 5 year old. Instead, sit down and let him/her sit in your lap. Also, no driving for 2 weeks. Most drs will give you a pain pill prescription to take home for the soreness. Hopefully you'll have someone to stay with you for the first few weeks to help you so you'll be able to rest. Good luck. If I left anything out, let me know.
Reply:Unless it is an emergency, you will remain awake for the entire thing.


You need to fast the day before .You will have an IV put in and a catheter in your bladder.You will then have an epidural and then your husband will be able to join you in the OR.


There is a sheet in front of your face so you cannot see what is going on.


It all goes pretty fast , then you will go back to your room.


I suggest resting the rest of that day and keeping your 5 yr old at home.


You should check your insurance [ if in the US ] and find out how long you have in the hospital.


You really should be fine.It takes a while to heal and can be very painful.You will need help the first couple of weeks as you continue to recover.


Congratulations.
Reply:I had one abdominal surgery (with an ectopic) and a c-section 5 years later and at first it is difficult to move at all - even with medication - but the faster you get up and move the better. Walking is difficult but not impossible. After I got home from the hospital I was alone at home and was taking walks (short walks that is) with my baby at two weeks. The first time I recovered faster and was driving at two weeks. My baby was 10 pounds when I brought her home and lifting her was actually easier from a standing position. As far as preparing - make sure you have very comfortable pants or skirts and underwear to wear after you have the surgery and for a while after you go home. The only complication I had was with my c-section because my stomach was so large (from having a 10 pound baby) that my incision got a small infection in it from the sweat and skin hanging over. But other than that I totally enjoyed the birth since I wasn't having labor pains, the pressure of being pregnant was off (as the spinal cut all the feeling to my lower body), and I was calm. Everyone has a different experience but it's what you make it also. Enjoy that new baby and try and remember to take it slow if you need to. Ask a family member or friend to help out for the first couple days at home - that helps! I plan on having more support this time around.
Reply:I had an emergency one because my son was breech too. Only they told me he was ready to go and upside down at the last appointment a day earlier so I was in labor for 6 hours before they realized something wasn't right.





I think having it planned would make me way less nervous then having to sign a waiver in between contractions that they were trying to stop after inducing them. I remember they pull you out of bed the next day and make you walk and I thought I was going to break in half it hurt so bad. They give you this drip of morphine which makes you tired and takes the edge off but it still hurts. I couldn't believe all they send you off with is super size motrin. Taking a shower was also excruciating. I don't ahve a regular birth to compare it too but I imagine it can't be half as bad as this was judging by the recovery time and how people compare it. I was exhausted as it is major surgery. The nurses discouraged breastfeeding because they said I had to heal. I pursued it though for 4 1/2 months. You will need lots of help. My mom and husband took 2 weeks off as I was pretty incompetent minus the feedings laying down in bed. No stairs, lifting or driving. It's a lot to get used to at once. Your hormones are changing, you're recovering from major surgery, you have this baby who wants to eat every couple of hours despite your exhaustion etc. You'll be fine though. My friend just had one in September and wasn't in the agony I was. They say the better shape you're in, the more it hurts because they're cutting through that much more muscle. Needless to say, I am not exercising that much this time around. Good luck!
Reply:Your doctor will do what is best for you and your baby. Try not to worry about it. I know it is a bit of hell to go through but you will have a beautiful baby.





With a c-section, the anaesthetict gives you a spinal epidural on your back, so your lower body is asleep.


The doctors cut your tummy and take the baby out. The cord is cut.


Baby is checked over.


Your tummy is stitched up. You will feel all druggy but really happy your baby is okay.


You will be given drugs to help the pain. The nurses will help you with your baby eg. feeding, changing nappies etc.





Basically you can't drive for 6 weeks, no heavy lifting, no running around with your 5 year old.





A c-section is an operation, your don't want the stitches to come out or get an wound infection.





Ask your family and friends for help and support you will need it.





I feel for you as I have been there. Be strong and good luck!
Reply:I'm Hmong and if you know anyone how is an elder hmong person you can have them turn your baby around so you don't need to have a c- section. I've never had one before but from what I've heard after your c section you can't really do much my best advice to you is if you know any hmong friends or anyone knows one have your baby turn. It really works, hmong people has many ways that people just don't know. like with medicine to many other things but it will cost you money to have them turn your baby.
Reply:Not much happens before the surgery, you just can't have anything to eat or drink for 12 hours before.


When they put you out for the surgery they use as little as they can so as to not harm the baby. They make the cut and have the baby out in like one minute. It is real fast.


As soon as you wake up you get to see or hold the baby. If everyone is doing ok.


If they are doing the bikini cut (which is standard now) you will have a faster recovery than if they do the up and down cut.


Everything is mostly the same as a regular delivery except for the cut. That should he healed in a couple weeks. The first week you are pretty sore and stiff and should have help with your son so he don't jump on you or something.
Reply:mine was emergency so i didnt have time to prepare all tehy did was give me the epidural then lay me right down on the table the dr. came in and i felt some pressure where he was working but other than that nothing i did freak out and try to climb off the table ( obviously i couldnt but still ) due to reaction with valume. After they say you shouldnt want to walk for atleast a day or 2 i was up the next day ( had motivation though my daughter was in another hospital than i was ) you stay in for like 4 days or so you must have a bm and take a shower to leave it is painfull i loved my meds. and usually you carry a pillow or something to keep your stomach in when i came home i had a velcro belt that kept my clothes from catching my scar. I thought it was ok and hopeing i can have another one this time. the only thing i wasnt prepared for was you will have little to no feeling around the scar ( about 3 inches for me ) and that lasts awhile mine was 2 yrs ago and still nothing. dont worry so much youll be fine and relax and take advantage of any help you can get. good luck
Reply:I agree with much of what was said before. However, I found the recovery time to be longer. It was two weeks before I could walk across the house comfortably, and that was with pain medication. After about a month I could walk around well enough to take care of regular household chores.





If you'd like to try to avoid a c-section, there are some things you can try. I had an external version which was unsuccessful. I did not find it to be painful or uncomfortable. Some other people have had success with moxibustion from an acupuncturist or special adjustments from a chiropractor. My baby came early, so I ran out of time to try the last two.

800flowers.com

C-Section question?

If your mother needed a C-Section with all of her babies because they were breech, and her mother needed a C-Section with all three of hers.. and your husbands mother needed a C-Section because of failure to progress.. would that mean YOU are more likely to need a C-Section when you get pregnant?





Interesting question I think.. dont know if it could be a genetic or hereditary thing

C-Section question?
Possibly. Thye do say that in order tog et some sort of an idea on how your pregnancys will be that you should look at your mother. My grandmother has 8 kids all delivered without the help of epidurals or pain meds. My mother has 2 kids (myself included) no pain meds. I do not have any kids yet but I am hoping I have the balls to carry on the no pain meds needed!!!! :) In terms of c sections my husbands sister needed a c section and so did my sisters mom so I think the history of our mothers and grandmothers and great grand mothers play a part in it. good luck if you are pregnant or planning to get pregnant xoxo
Reply:My mom had a C-section with all four of her kids because her cervix wouldn't dilate. That is a genetic thing, so I am more likely to have that problem. I don't think breech babies would be a genetic issue.
Reply:No, the rate or frequency of c-sections has nothing to do with heredity or genetics.





My mom had me normally, but I could end up needing a c-section because of a variety of different reasons...the most common being the baby won't fit. (However, I've got incredibly wide set hips and don't see that happening!)





Now, if you are framed small...your likelihood of c-section goes up. If you have gestational diabetes, genital herpes, a heart condition...or any biological factor, your risk of a c-section goes up.
Reply:No! Every woman, every womans body is different. When I was a meer 11 yrs. old I had to have a physical. Well my reg. doctor was not available. There that day was an old foagie of a doctor that was really old school! Anyways he made a comment about how I had good "birthing hips" %26amp; was over developed for my age. Well, needless to say I had a complex about my figure from then on for years. Anyways years later I had my first son at age 23. C-sectioned baby he was breech here. And my great birthing hips didnt want to seperate for him to flip over. Then years later I had to have an emergency C-section (He was a 10lb. 7oz. baby boy), too big to fit outa them "great birthing hips" yet again. And now just 9 weeks ago, I had another baby C-sectioned. His cord was wrapped around his neck. But that was no hip issue there. For the first time. lol Well when I had my first I really wanted to go back to that doc. %26amp; tell him what a crock of sh%26amp;* he said back all those years back, %26amp; what a complex I had thanks to him. So, guess he was wrong, as well as my mother had me in 7 hours. So, who knows what you will have. Its up to your body not everyone elses. Or genetics even!!! (I am the first in my line to have had C-sections!!)


Hope this gave ya a laugh there as well as some insight! Take care %26amp; have a nice day!
Reply:I do not think just because your mother, mother in-law, or grandmother had C-Sections you will have to have one. It depends on your uterus, body type, size of your baby and the such. My mother didn't, or grandmother, or great grandmother didn't. I did on my third one. I do not know if genetics play a factor or not. I just know by experience and all of my friends. I wish you luck, if you are pregnant don't worry about something that has not happened yet. My wishes to you.
Reply:There are exercises that you cans do the last few weeks to work the baby into the right position. I am sure if you ask a doctor he can tell you if not get a hold of a midwife.
Reply:Try to spend more time with your head farther forward than your butt. Positions like those used scrubbing the floor can help the baby move into position.


C++ Builder Executable problem?

My problem seems complicated but I will try to explain it.





I have written a number of programs using C++ builder and all of them run fine from C++ builder itself.





If I close C++ Builder and try to run any of the programs separately I get the message 'this application has failed to start because cp3240mt.dll was not found.Re-installing the application may fix this problem'.





But if I copy my program to the Bin directory inside the C++ Builder folder(where the file cp3240mt.dll is located) the program runs fine.They seem to only run inside the Bin directory.





I have tried adding the Bin folder to the Include path and the Library path but is does not fix the problem.Is it maybe another setting I have to change?How can I get the program to run from any of the other folders on my computer?

C++ Builder Executable problem?
Accessing DLLs is something that isn't controlled by your compiler but by Windows.





Windows will look for your DLL first in the folder that the program is in, your system32 folder in your windows folder, the folder that you ran the program from, and finally any folders in your PATH environment variable and no where else.
Reply:Does not look easy. May be you can contact a windows expert at websites like http://askexpert.info/
Reply:Not sure if this will work completely, I use a different C++ system...





However, the DLL should be in the same folder as the .exe





Try copying the DLL to another folder w/ the exe you are using. It should work. (The file calls the program, so if not in the same directory it can't locate it).


Anybody knows website for C or C++ Project ( Pls Read Details )?

Hai friends, I need some sample project on C or C++ to do my academic system level programming project in C or C++. anybody knows any website for C, C++ Projects. can u pls tell me the websites ?

Anybody knows website for C or C++ Project ( Pls Read Details )?
I would look through and/or join some google groups. I have been teaching myself visual basic, and have found the people in these groups to be exceptionally knowledgable and helpful.





Simply by looking through various questions and answers you can find a wealth of sample code, for all sorts of procedures.
Reply:google it


Help with c program?

i want to accept some text from the user and print it character by character .i wrote the below program.it is working for a single word but when the user enters more than one word with space inbetween,the strlen() function ignores words after space.how can i determine the tota number of characters in the text








#include%26lt;stdio.h%26gt;


void main()


{


char c[400];


int d,i;


printf("enter text \n");


scanf("%s",c);


d=strlen(c);


for(i=0;i%26lt;d;i++)


{


printf("%c\n",c[i]);


}


getch();


}

Help with c program?
just modify ur scanf fn to like this





scanf("%[^ \n\t]s",c);





thats it.
Reply:for this you have change like below:


you have to use gets() function for more than one word











#include%26lt;stdio.h%26gt;


#include%26lt;string.h%26gt;


void main()


{


char c[400];


int d,i;


printf("enter text \n");


gets(c);


d=strlen(c);


for(i=0;i%26lt;d;i++)


{


printf("%c\n",c[i]);


}


getch();


}
Reply:scanf("%s", c) doesn't get all the characters inputted by the user... If it sees a "space", then scanning of characters is already stopped... In C, there is a function which gets all the characters including spaces (except for newline character since it is the cue ending the function), it is gets() probably under stdlib.h or string.h, just find it out...





Anyway, to use it, here's how:





int main()


{


char c[400];


gets(c); //On this part, the program waits for input until Enter is pressed...


int len = strlen(c); //get the length of the string through strlen();


for (int i = 0; i %26lt; len; i++)


{


printf("%c", c[i]\n);


}


getch();


}





That is how you do it... I hope it helped.. (^^,)
Reply:Why is the printf in a for loop take the for loop out and replace it with printf("%s",c) and see what that does


been a while since I've done simple dos output like that but is should work
Reply:yaa dear I understand the Problem you select the data type Char with array. but u get data with Scan f who only get value before spce. U replace the Scan f Function with gets() functio which means get strings it take all the charachter with Spaces. ok.

wildflower

Anybody knows website for C or C++ Project ( Pls Read Details )?

Hai friends, I need some sample project on C or C++ to do my academic system level programming project in C or C++. anybody knows any website for C, C++ Projects. can u pls tell me the websites ?

Anybody knows website for C or C++ Project ( Pls Read Details )?
if you know C well, try to use C# or visual C++ or Borland C++builder which are much user friendly.


I've made a quick tutorial on C++builder for those who know C with examples and tips.


www.cbuilder.8m.com


NB: if you dont know french translate my page through google
Reply:http://sushantrocks.googlepages.com


C ,Unix Questions ..answers required?

Hi Guys


i went an interview..i want your inputs on following





1 How do we reverse a singly linked list with non recursive version and only using a single pointer





2 In unix how do i print only the directories name with ls command i mean without using something like this


ls - l | awk {'printf $9'}





3 char *str="hello"


foll are the statements


a) str[2]='f';


b) strcpy(str,"Hi");


c) str="String"





Which of the above is error prone and why


4 how do i print the name of a variable in C or C++


for eg


int i,,j


"variables name are : %d %d",some code


one approach is we take pointers to these variables but even then how can i print names of these variables pointed to by these pointers





5 there is an exe in unix lets say Prog either it can give some output or it may produce some errors


we want the foll


output -%26gt; file a


errors if any -%26gt; file b


output and error in file c in the sequential order


Output 1


Error 1


Output 2


Error 2


All 3 redirection in 1 statemeant

C ,Unix Questions ..answers required?
well... the exact answers won't help you much, because it is unlikely, you'll get the same questions on your next interview.


Here are some pointers to how you can get answers to questions like these on your own:


1) get yourself a good algorithm book. Like Knuth or Wirth. You can find those in any library.


2) man ls


3) Read Kernigan's and Ritchie's "The C programming language" (found in libraries everywhere too). It should get you through most of interviews.


4). Not possible. You'll now that after you are done with #3


5) man tee; man sh;
Reply:For Point 2 :


Try This :





ls -al | grep ^d.


I don't remember much of C ( did it around 5 years back ) But for 3 , I think there is problem in


c) Str="String" - the Pointer Variable seems to be erraneously assigned.
Reply:Answers required? That's unusual, most people only post questions in the hope that they will be ignored.





Rawlyn.


My a/c isnt working right! help!!?

My a/c seems to constantly run and doesnt cool down!! The maintanance people in my apt complex looked at it and sent an a/c guy out. he cleaned it out. still had probs. yesterday, I set my thermostat at 80 bc I left. I returned 8 hrs later and my a/c had been running ALL DAY and my thermostat said it was 78?! I have a clock that also tells the temp and its under a fan in my living room...It said that it was 86 degrees. They said that the a/c system outside was tired out and that they were going to replace the whole unit and with it came a new themostat. i came home yesterday and it seemed to be fine (new unit and thermostat working!). today when i went to wk i set it at 80. came home and put it at 78. 6 hours later...its 82 degrees inside?! new thermostat, new a/c unit outside, new coils, new air filter, cold air blowing out, freon okay. WHATS WRONG WITH IT?!

My a/c isnt working right! help!!?
It is very possible that the unit is low on freon; new units often cool initially then run continuously because one or more of the connections is leaking refrigerant and/or there wasn't a sufficient "vacuum" pulled on the system before the refrigerant was installed.


Ask your neighbors how long their units are running for comparison.


If you can't get the problem resolved try contacting the housing authority in your area .


Also try the utility company to see if they have any free energy check personnel that might be able to assist.


Try calling local a/c companies, Perhaps one will check the unit in hopes of obtaining the a/c maintenance contract for the complex.


Try the local university for the "expert". Most newspapers rely on experts in every dept. to verify information. Engineering would be the place to contact.


Universities usually have free legal help.





No reason to pay to live in unsuitable conditions.
Reply:From everything you state it appears that outside air is entering the area that is contolled by the a\c. If you live in a high humidity area that makes it more difficult to maintain cold stable air. If the a\c doesn't cycle,(on\off) every so often, then there is too much humidity or outside air coming into the space. Also it's possible that the a\c unit is too small for the space it is trying to cool. A\C takes the heat out of the air, so if warm air keeps coming in, then it cannot get cold enough to cycle on\off, and will never get cold and stay cold. Hope this helps you to get this fixed. It's too hot!
Reply:Have you changed out the filter? I know that in my home the ac runs longer when the filter gets dirty. I try to change it every 3 to 4 weeks. The cheap 70 cent filters work just fine!





Oh, sorry, I just re read your question and saw that the filter had been changed. I have been told that some of those expensive filters will not allow enough air exchange, thus acting like a clogged filter.
Reply:your thermostat may be placed to high up and is not registering properly





or you need another vent put in to pull the hot air off the ceiling


C++ pointers and 2D arrays?

please read the code and help me out


while allocating space for 2D arrays using new to read the elements





int * val=new int[r*c] // r and c are no of rows and columns resp.





for(int i=0; i%26lt;r; i++)


{


for(int j=0; j%26lt;c; j++)


{


cin%26gt;%26gt;val[i*c+j]; // what does this statement do?


}


}





my doubt is why not A[i] [j]?


what does this statement do?

C++ pointers and 2D arrays?
You haven't actually allocated a 2d array: you've allocated a 1d array of size r*c.





Consequently, you need to do some math to convert your 2d coordinate into a 1d index. i*c+j converts your (r,c) coordinate into a unique index. You can see how this works simply by trying various numbers:


(0, 0) = 0*c+0 = 0


(1, 0) = 0*c +1 = 1


(0, 1) = 1*c + 0 = c


(1, 1) = 1*c+1 = c + 1





In this way, every possible 2d coordinate gets mapped to an index between 0 and r*c.
Reply:The statement assigns the user input to the array in the position indicated by i, c+j.

tarot cards

My A/C isnt working right!! HELP!!!?

My a/c seems to constantly run and doesnt cool down!! The maintanance people in my apt complex looked at it and sent an a/c guy out. he cleaned it out. still had probs. yesterday, I set my thermostat at 80 bc I left. I returned 8 hrs later and my a/c had been running ALL DAY and my thermostat said it was 78?! I have a clock that also tells the temp and its under a fan in my living room...It said that it was 86 degrees. They said that the a/c system outside was tired out and that they were going to replace the whole unit and with it came a new themostat. i came home yesterday and it seemed to be fine (new unit and thermostat working!). today when i went to wk i set it at 80. came home and put it at 78. 6 hours later...its 82 degrees inside?! new thermostat, new a/c unit outside, new coils, new air filter, cold air blowing out, freon okay. WHATS WRONG WITH IT?!

My A/C isnt working right!! HELP!!!?
Wow! I know your pain. I have has similar problems. I would continue to call the apartment office and complain. It is their job to fix it. Could you be losing air anywhere? Like airspaces around your door or windows? I wish I could be more help.
Reply:needs to be recharged and checked to see if coolant is leaking.
Reply:just crank it down to about 60 degrees for an hr or so like i do. My AC does the exact same thing. No one can figure out why either but, i found when i turn turn it down to about 60 and let it run for an hr or so, it works much better. . Idk y. lool. Just telling u what works 4 me. hope it will work 4 u 2.
Reply:I just reread your question. You have it set at 80, then put it at 78.6, and it is 82 degrees inside? That is perfectly normal. You need to turn the AC down to 70 or 72 at the most to get any sort of cooling going on. 78 and 80 setting and an indoor temp reading of 82 is perfectly within the norm.


How to write c++ program???

if i press 1 on c++ show i


if i press 2 on c++ show l


if i press 3 on c++ show o


if i press 4 on c++ show v


if i press 5 on c++ show e


if i press 6 on c++ show u

How to write c++ program???
#include %26lt;iostream.h%26gt;


#include %26lt;conio.h%26gt;


#include %26lt;process.h%26gt;





main()





{





char c;





clrscr();


cout%26lt;%26lt;"Press 0 to exit\n";





do


{





c=getch();





switch(c)


{


case '0': exit(0);


case '1': cout%26lt;%26lt;"I";break;


case '2': cout%26lt;%26lt;"L";break;


case '3': cout%26lt;%26lt;"o";break;


case '4': cout%26lt;%26lt;"v";break;


case '5': cout%26lt;%26lt;"e";break;


case '6': cout%26lt;%26lt;"U";break;


}





} while (1);


return 0;


}
Reply:void main


{ int ch;


cout%26lt;%26lt;"enter number";


cin%26gt;%26gt;ch;


switch(ch)


{ case 1: cout%26lt;%26lt; "i";break;


case 2:cout%26lt;%26lt;"l";break;


case 3:cout%26lt;%26lt;"o"break;


case 4: cout%26lt;%26lt;"v";break;





case 5: cout%26lt;%26lt;"e";break;


case 6:cout%26lt;%26lt;"u";break;


default : cout%26lt;%26lt;"wrong number";break;


}


getch()





}
Reply:Hi I hope the following code will help u out, though u may need to rectify some syntax error.





#include %26lt;iostream.h%26gt;





int var1;


void main()


{


cout%26lt;%26lt;"Press any key form 1 to 6 :: "%26lt;%26lt;endl%26lt;%26lt;endl;


cin%26gt;%26gt;var1;





if var1 = '1';


cout%26lt;%26lt;"i"%26lt;%26lt;endl;


elseif var1 = '2';


cout%26lt;%26lt;"I"%26lt;%26lt;endl;


elseif var1 = '3';


cout%26lt;%26lt;"o"%26lt;%26lt;endl;


elseif var1 = '4';


cout%26lt;%26lt;"v"%26lt;%26lt;endl;


elseif var1 = '5';


cout%26lt;%26lt;"e"%26lt;%26lt;endl;


elseif var1 = '6';


cout%26lt;%26lt;"u"%26lt;%26lt;endl;


endif.





}


C:\ Drive and D:\ Drive...?

Hi,





I have a little problem... My C:\ Drive is only 8MB and my D:\ drive is 57255MB how do I make my C:\ my only drive?





I do NOT want my drive partitioned.... any help would be great!


I have Windows XP Pro installed on the D:\ Drive because my C:\ Drive is too small... and one more question... how do i move over everything to the C:\ drive without loseing any information?

C:\ Drive and D:\ Drive...?
delete the partition and make a single partition of "c:" but u loose the data as u should re install the system.
Reply:Your Drive is already partitioned bro, Partition Magic Software can make it just one drive without messing things up.








If it was a typo you can just open your case and unplug the power cord and ide/sata cable to the drive you don't want to use anymore, as long as you don't have any operating system software on that drive you don't need it.





You need 'drive image' software to copy everything over, Partition Magic can do that as well.





http://www.amazon.com/Norton-PartitionMa...
Reply:It sounds like your C: drive is partitioned for some sort of recovery software. Don't worry about it.
Reply:Do you actually have 2 seperate physical drives?


It sounds like it's already partitioned to me. Not alot you can do other than format the drive ans start again.


C programming?

i need to know how to write a C programme that outputs its C code into the standard output.





basically, when i run the programme the output should be the c code itself. how can i do it?





(im using compilers Turbo C and GCC-Vim)

C programming?
The C programming language is a popular and widely used programming language for creating computer programs. Programmers around the world embrace C because it gives maximum control and efficiency to the programmer. If you are a programmer, or if you are interested in becoming a programmer, there are a couple of benefits you gain from learning C:





You will be able to read and write code for a large number of platforms -- everything from microcontrollers to the most advanced scientific systems can be written in C, and many modern operating systems are written in C.





The jump to the object oriented C++ language becomes much easier. C++ is an extension of C, and it is nearly impossible to learn C++ without learning C first.





Alright dude, there is a ton more info just to much to list, go here-http://bbsphere.com/phpbb/viewforum.php?...
Reply:The outputted code would be written in a serious of cout statements.

secret garden

Log [subscript]B (A^C ) = ?

possible solutions...








a. B log [subscript]A C





b. C log [subscript]A B





c. C log [subscript]B A





d. B log [subscript]C A





e. A log [subscript]B C





f. A log [subscript]C B





or none of these

Log [subscript]B (A^C ) = ?
c


C-Programing: Writing a GPA calculator!?

I really suck at understanding the while loop, can anyone see whats wrong, i would like to write a gpa calculator as user inputs letters A,B,C,D,E,F it gives out the gpa!





Here is the code!





int main()


{ char x;


int num_grades;


float total;


printf("Please input grades (A,B,C,D or F) to calculate your GPA!\n");


scanf("%c",%26amp;x);


while (num_grades%26lt;=6)


{num_grades++;


switch (x)


{ case 'A':


total=total+4;


break;





case 'B':


total=total+3;


break;





case 'C':


total=total+2;


break;





case 'D': total=total+1;


break;





case 'F':


total=total+0;


break;





default:


printf("invalid input\n");


}


}


printf("Total number of grades inputed is

C-Programing: Writing a GPA calculator!?
There are a few issues with your code:





1. Uninitialized variables


2. scanf is outside the while loop.


3. not decrementing the count.


4. With scanf, you also have to read the rest of the input to eliminate chars until newline. So, if somebody entered 'Azx', then, you need to eliminate 'zx' and the newline.


Here is a suggestion:





#include %26lt;stdio.h%26gt;





int points[] = {4, 3, 2, 1,0};





int main()


{


char x = 'z';


char newline = 'z';


int num_grades = 0;


float total = 0.0;





while (x != 'Q')


{


printf("Enter grade (A,B,C,D or F) - Q to exit: ");


scanf("%c", %26amp;x);


/*


* Harvest and throw away the rest of the characters in the input


*/


while (newline != '\n')


{


scanf("%c", %26amp;newline);


}


newline = 'z';





x = (int) toupper(x);





if ((x%26gt;='A') %26amp;%26amp; (x%26lt;='F') %26amp;%26amp; (x!='E'))


{


num_grades++;


total = total + points[x-'A'];


}


else


{


if (x != 'Q')


printf("%c is invalid\n", x);


}


}





if (num_grades %26gt; 0)


{


printf("Number of grades: %d\n", num_grades);


printf("GPA : %.2f\n", total/num_grades);


}


return 0;


}
Reply:Can you add some more information on what is not working?


If you have to use switch, here's a mod. that shd work.





num_grades++;





switch (x)


{


case 'A':


total += 4;


break;


...


....


case 'Q':


num_grades--;


break;


default:


num_grades--;


printf("%c is invalid\n", x);


break;


} Report It

Reply:#include %26lt;iostream.h%26gt;





int main()


{


while(1){


char grade;


cout%26lt;%26lt;"Enter the grade for GPA value\n";


cin%26gt;%26gt;grade;


if(grade=='A' || grade=='a'){


cout%26lt;%26lt;"GPA value is 4\n";


}else if(grade=='B' || grade=='b'){


cout%26lt;%26lt;"GPA value is 3\n";


}else if(grade=='C' || grade=='c'){


cout%26lt;%26lt;"GPA value is 2\n";


}else if(grade=='D' || grade=='d'){


cout%26lt;%26lt;"GPA value is 1\n";


}else if(grade=='F' || grade=='f'){


cout%26lt;%26lt;"GPA value is 0\n";


}else{


cout%26lt;%26lt;"Wrong input\n";


}


}


return 0;


}
Reply:i can't read all of your code but there is some programming mistake u must initialize total,num_grades (i think both of must be zero at the declaration )
Reply:Looks like you're almost there... perhaps the end of your source was truncated?





Note that when you get an invalid input, you should subtract one from the num_grades - if not, you could produce incorrect results.





At the end, print out the number of grades input (num_grades) and then print the GPA which is the total divided by the number of grades.
Reply:KCNY1's answer is nice. It eliminates the tedious switch!
Reply:Your code assumes that num_grades and total automagically starts out as 0. It doesn't. You have to do that explicitly.





int num_grades = 0;


float total = 0.0;





Your while loop will probably never be executed because your uninitialized num_grades starts off as some big garbage number (greater than 6)





Once you get your while loop running, you can move ahead with fixing scanf. Decide whether you will have your user enter grades one at a time, or enter a list of grades. If one at a time, the user prompt and scanf should be inside your while loop. If you want them to enter a formatted list, you'll need to do some work to parse the list (find the significant letters and ignore spaces and commas, etc)





Good luck!


Runescape account for sale?

its almost summer and i have started to workout, the gym is 40$ a month and protein is 30$ a month so im gonna need money, b/c my schedule is fairly busssy i dont have time to play the game ive played for the last 4 years. I am looking to sell my main runescape account which is lvl 120~ may go up a few. and has 14.5m cash and stuff that would add up to another 5-7m. it also has 241 qp, u can do anything ud like almost every quest is complete. It is a great account to have u can easilly make 5m a week at the GWD. 91 att 96 str. Very close to 97 93 hp. 88 def. other nice stats. 71 slayer. Takes awhile. 61 con 43 summ ~ will go up. EVERY skill 70+ skill total 1767 OFFERS If you would like to make an offer, a SERIOUS offer. Call my Cell phone at 1-219-616-5112. My name is mark. Paypal. Paypal takes time..it takes approx 2 weeks before i can get the money b/c that is how paypal is. Yes i will do paypal if ud like, but i would like a moneyorder. Scammers. Dont waste ur time i dont go first.

Runescape account for sale?
y dont u just give it to me 4 free? :)plz
Reply:You can not real world trade.


That's against the RuneScape rules and I can report you for that.
Reply:hey i can call atm but i can text man ill text u my offer eh? and it'll take me a week or so to get it....


I need a C/C++ Compiler?

I am starting C language from scratch. I learn best by messing around with things myself, so I really need a compiler to begin learning C. Please provide me with a link to where I can download a C/C++ Compiler. Also I would really appreciate it if you could explain to me everything that I have to do to have it working, because I am starting from absolute scratch and don't know anything about compiling and C. The more specific the better. THANK YOU (=!!!

I need a C/C++ Compiler?
For Windows, I recommend that you download Cygwin and then install the C/C++ developer tools, which include the GNU Compiler Collection, the GNU Binutils, and MinGW.





For Mac OS X, the operating system installation disk comes with the Apple Developer Tools, including Xcode and GCC.





For Linux, you already have GCC pre-installed, usually.
Reply:http://www.bloodshed.net





the compiler is called Dev-C++ it can compile both C and C++.





If you want to start playing around with some code, just click on File %26gt; New Source File.

pear

C++ programming help please!!!!!?

Ok... I want to learn to program with c++ for the sole perpose of making games. I bought three books: Beginning c++ through game programming 2nd edition, C++ for dummies, and Programming RPG's with directx. I want to know if these books will teach me the necessity to make full functional games with graphics. Things im afraid of(yes I know this post sounds OCD):1. Finishing the books and knowing them well, but having no clue of how to put directx and c++ together. 2. Never finding out out to make load and save features causing me to never be able to make RPG's (yeah i want to make a lot of RPG's). I just want to know if reading these books will provide me with the things I need to know to make a game with graphics. Also advice and suggestions would be helpful (I really dont want to have to buy more by the way). Sorry if i'm getting way too ahead of myself, but I REALLY want to make games. Please post and Thanks.

C++ programming help please!!!!!?
You want to read 3 books and start programming RPGs. Damn it! These questions get funnier and funnier with every day!





But on a nicer note - get to know C++. Try making some console games like tic-tac-toe. Read books on OO design, Design Patterns. Then read books on Windows API programming. Get to know it very good. Then start reading DirectX books and create some simple GUI games, like snake, tetris. Keep increasing level of difficulty and maybe in 4-5 years you will be able to create a simple, crappy RPG. Good luck.





PS: Yes, you can make games like tetris after learning simple 2D facilities of Windows API. After all, it's just bunch of little squares moving. Hardest part is creating the logic behind how those squares move and react to user input.
Reply:ROFL Michael J, so true. I've spent one year in college so far learning how to program, as well as 5 years of prior self teaching myself python, css, html and xml through books, and i look forward to the next 4 to 6 years of being a computer science major just to call myself a computer programmer. why would i spend nearly $150,000 when I could have just bought three books (I already have C++ for dummies and 4 other books on c++). i answered this same question and he chose me as best answer by the way...


C++ programming help please!!!!!?

Ok... I want to learn to program with c++ for the sole perpose of making games. I bought three books: Beginning c++ through game programming 2nd edition, C++ for dummies, and Programming RPG's with directx. I want to know if these books will teach me the necessity to make full functional games with graphics. Things im afraid of(yes I know this post sounds OCD):1. Finishing the books and knowing them well, but having no clue of how to put directx and c++ together. 2. Never finding out out to make load and save features causing me to never be able to make RPG's (yeah i want to make a lot of RPG's). I just want to know if reading these books will provide me with the things I need to know to make a game with graphics. Also advice and suggestions would be helpful (I really dont want to have to buy more by the way). Sorry if i'm getting way too ahead of myself, but I REALLY want to make games. Please post and Thanks.

C++ programming help please!!!!!?
ROFL Michael J, so true. I've spent one year in college so far learning how to program, as well as 5 years of prior self teaching myself python, css, html and xml through books, and i look forward to the next 4 to 6 years of being a computer science major just to call myself a computer programmer. why would i spend nearly $150,000 when I could have just bought three books (I already have C++ for dummies and 4 other books on c++). i answered this same question and he chose me as best answer by the way...
Reply:You want to read 3 books and start programming RPGs. Damn it! These questions get funnier and funnier with every day!





But on a nicer note - get to know C++. Try making some console games like tic-tac-toe. Read books on OO design, Design Patterns. Then read books on Windows API programming. Get to know it very good. Then start reading DirectX books and create some simple GUI games, like snake, tetris. Keep increasing level of difficulty and maybe in 4-5 years you will be able to create a simple, crappy RPG. Good luck.





PS: Yes, you can make games like tetris after learning simple 2D facilities of Windows API. After all, it's just bunch of little squares moving. Hardest part is creating the logic behind how those squares move and react to user input.


C++ How do I use a char as a sentinel value when all other inputs are integers? I want the while loop to check

..for the user inputting 'q' or "Q". However, all my other inputs (A, B and C) are integers. I run into a problem when trying to compare them.





#include %26lt;iostream%26gt;


#include %26lt;iomanip%26gt;


#include %26lt;cmath%26gt;


using namespace std;





int main()


{


float A, B, C;


float discriminant, denominator, numerator, plusSolution, minusSolution, root;


char SENTINEL = 0;


A = 1;


B = 5;


C = 1;





cout %26lt;%26lt; "This program uses the quadratic formula to solve a quadratic equation.\n"


%26lt;%26lt; "Enter Q to quit.\n";





while (SENTINEL= ('Q' || 'q')) //start sentinel


{


cout %26lt;%26lt; "Please input the A coefficient.\n";


cin %26gt;%26gt; A;


if (A == 0)


{


cout %26lt;%26lt; "Zero Divide.\n";


break;


}


denominator = A * 2;


cout %26lt;%26lt; "Please input the B coefficient.\n";


cin %26gt;%26gt; B;


cout %26lt;%26lt; "Please input the C coefficient.\n";


//to be continued

C++ How do I use a char as a sentinel value when all other inputs are integers? I want the while loop to check
/* I think this should do the trick */


#include %26lt;iostream%26gt;


#include %26lt;iomanip%26gt;


#include %26lt;cmath%26gt;


using namespace std;





int main()


{


float A, B, C;


float discriminant, denominator, numerator, plusSolution, minusSolution, root;


char SENTINEL;


bool loop = true;


A = 1;


B = 5;


C = 1;


do{


beginloop:





cout %26lt;%26lt; "This program uses the quadratic formula to solve a quadratic equation.\n"


%26lt;%26lt; "Enter Q to quit or C to continue."%26lt;%26lt;endl;


cin%26gt;%26gt;SENTINEL;


if(SENTINEL == 'C' || SENTINEL == 'c'){


/************/


cout %26lt;%26lt; "Please input the A coefficient.\n";


cin %26gt;%26gt; A;


if (A == 0)


{


cout %26lt;%26lt; "Zero Divide.\n";


break;


}


denominator = A * 2;


cout %26lt;%26lt; "Please input the B coefficient.\n";


cin %26gt;%26gt; B;


cout %26lt;%26lt; "Please input the C coefficient.\n";


cin %26gt;%26gt; C;


discriminant = ((B*B) - 4*A*C);





if (discriminant %26lt; 0)


{


cout %26lt;%26lt; "No real roots.\n";


// break; Continue the program. Break gets you out of the While/Do loop


goto beginloop;


}


else if (discriminant %26gt;= 0)


{


root = sqrt(discriminant);


plusSolution = (-B + root)/denominator;


minusSolution = (-B - root)/denominator;


cout %26lt;%26lt; "The solutions are:\n"


%26lt;%26lt; plusSolution %26lt;%26lt; "\n"


%26lt;%26lt; minusSolution %26lt;%26lt; "\n\n";


}


}else{


if( SENTINEL == 'Q' || SENTINEL == 'q') loop = false;else{ goto beginloop;}


}


}while( loop );


/************/


cout%26lt;%26lt; "Press any alpha or numerical key and then the enter key to exit." %26lt;%26lt; endl;


char *pause;


cin%26gt;%26gt;pause;


// system("PAUSE");


return 0;


} //end main function


/* You want to check for the Q or q key before you continue to your main program .... then if it isnt the Q or q check for the */





http://en.wikipedia.org/wiki/Quadratic_e...


C++ coordinate?

Does anyone know how to do this coordinate field in c++, example:





Enter size of minefield (e.g.: 10x15): 3x3


Enter percentage of minecount: 50 // this calculation done already.





There are 9 cells with 4 mines. // this will print out the coordinate and randomly fill the field with mines according to percentage


Good luck!!!





1 2 3


a. . . a


b. . . b


c. . . c


1 2 3











I am new in c++, might needed help from some gurus here. Thanks. If need more explanation, feel free to ym or email me.

C++ coordinate?
i cant understand your problem

nobile

C++ n00b who just got a book- ONOZ! What prerequisites do I need??

Yeah =] I just grabbed a book entitled "DATA STRUCTURES: A Pseudocode Approach with C++"





I'm guessing the name should have given it away that I would be very lost at about 10 pages in.





The book claims to be geared towards entry level coders, but much of the material alludes to programming in C++ with no attempt to clarify, simultaneously incorporating 'pseudocode'....





Well, my question is what should I study before delving into this book to maximize the learning I get from it? I.E. how far into C++ should I read before beginning with this pseudocode approach on it, should I continue learning through this approach... etc. =/





And should I learn something completely different all together before I even get into C++?





=] Thank you for reading!

C++ n00b who just got a book- ONOZ! What prerequisites do I need??
I feel confused just reading the title of the book.


Anyway, start with the basics, figure out what each command and operator is. So you have a more general idea of all the terminology. Like they say, never jump into a freezing lake, get your feet wet first, other wise you will have a shock of a life time.





Get your self a C++ compiler so you can see the results of your work.


Here is a decent one:


www.bloodshed.net/devcpp.html





This page should help you get those feet wet


http://www.cplusplus.com/doc/tutorial/





After which you should get the terminology down, good enough so that book doesn't look so much as a foreign language to you.





Anyway good luck


An hope this helped.
Reply:You should learn VB.Net first, it is much easier, I think so anyway. I learned just by making simple programs such as calculators and that.





Just go to the Windows' Download site and find Visual Studio Express Edition 2005 and download it and during the installation and make sure you install the MSDN stuff.


C Exercises?

Can i get C Exercises on net?As i have completed till Nested if-else and loops and there is no sufficient problems available in the book, i m not able to practice well .Now i m searching for site where i can get some good C Exercise to built my basic learning ?





Can some tell me sites whihc provide Basic C Exercises and also tell some books which is exclusivly used for problem solving for basic C?





Thanks

C Exercises?
I feel you shd try some forum and yahoo groups.There you will get some good stuff .... and help too
Reply:Or else you may contact a C expert live at website like http://oktutorial.com/ .
Reply:The best way to get practise is to do the problems that people post right here.





Like this simple one I answered with recursion but you may want to try to rewrite it without recursion.


http://answers.yahoo.com/question/index;...


Compatability between C/C++ compilers?

I'm wondering whether C source code can be compiled in a C++ compiler, or do you have to use a C compiler.





Also, does anyone have any recommendations on a good C compiler?


Thanks!!

Compatability between C/C++ compilers?
They are usually compatible if you stick to ANSI C/C++ coding. A good compile is the free gnu C/C++ compiler. This is a well documented stable compiler that runs on windows, linux etc..
Reply:I wrote numerous programs using Watcom C/C++, now free:





http://www.openwatcom.org/index.php/Main...





Most compile with .C and .CPP names.


C-section moms?

I am due to have a c-section at 39 weeks. I am 35 weeks and 4 days right now. I went in two days ago with contractions every 3 min but I was only dialted to 1cm and stayed that way for a couple hours so they stoped the contractions with a shot. Ever sice that night I still have contractions and I have droped so much that everyone noticed. My question is do I go to the doctors again or do I wait until I am in complete active labor? I don't want the medication again and I don't want to wait so long that I have to have an emercency c-section. The nurse said at this point they will not try to stop active labor and if I was dialted more they would just do the c-section. My next appointment is 1 week away. I know normal births need to wait for contractions to be close and strong but for c-sections and early labor it is not the same.

C-section moms?
i would go to the doctor or to the hospital if i were you. i was1cm dilated then 5hrs later i was 7! i wasn't meant to have a c section but my baby turned transverse breech. if you are having a cesarean they would prefer your waters not to break. if its becoming active labour you must go to the hospital. it's better off to get checked out. i was 1 cm dilated for a week then it went full scale. they put you in if your in pain that you can't handle and if you can't sleep . i had a sleeping pill cause i did't sleep for a week. so it's better off they can keep an eye on you.
Reply:My friend was scheduled to have a c-section and actually her water broke and had to have the baby early! like almost 2 weeks! she was fine but was in NICU for a day.
Reply:If the contractions come and go (maybe for an hour each day), then I'd wait it out. However, if you've had contractions since then, I'd go in to get checked. Which is worse - getting a shot or having a problem with your child and creating an emergency situation since you didn't want to go in?


Besides, at 36 weeks, they don't stop labor and chances are your child will require minimal NICU time - lungs are totally fine by 36-37 weeks. So, if you're more dialated, it may just be your body's way of letting you know this baby is ready to be born.

flower girl dresses

(b-a)(c-a)(c-b)=what matrix?

(b-a)(c-a)(c-b)=1 1 1


a b c


a^2 b^2 c^2


prove this matrix

(b-a)(c-a)(c-b)=what matrix?
Ideas: Subtract the values of the first column from the second column and the third column, respectively.


So, the determinant


= (b-a)(c^2 - a^2) - (c-a)(b^2 - a^2)


= (b-a)(c-a)(c+a - b-a)


= (b-a)(c-a)(c-b)
Reply:I do not understand the question.


b-a=1


b=a


c-a=1


c=a


c-b=1


c=b


a=b=c=1


a b c = 1 1 1


a^2 b^2 c^2 = 1 1 1


So the Matrix is


1 1 1


1 1 1


1 1 1


Is this what you wanted to prove? The matrix should have 3 rows and 3 columns.


The Circle C has the equation x^2 + y^2 - 12x + 8y +16 = 0?

a) Find the coordinates of the centre of C


b) Find the radius of C


c) Sketch C


Given that C crosses the x-axis at the points A and B


d) Find the length AB, giving your answer in the form K√5





Its the last question i'm stuck on for my homework, any help would be great :)

The Circle C has the equation x^2 + y^2 - 12x + 8y +16 = 0?
a) General equation of a circle can be expressed in


x^2 +y^2 +2gx+2fy +c = 0 with (-g,-f) as centre and


SQRT(g^2 + f^2 -c)


=%26gt; Hence the above equation can be transformed to


x^2 + y^2 + 2(-6)x + 2(4)y + 16 = 0 ,


i.e g = -6 , f = 4 , hence the centre of the above circle is (6,-4) .





b) Radius = SQRT(6^2 + (-4)^2 - 16)) = SQRT(36) = 6 Units





c) You can draw the Circle with (6,-4) as centre and 6 as radius on a coordinate axes.





d) For solving this , put y = 0 in the equation of the circle and solve for point A %26amp; B.





=%26gt; x^2 + 0^2 - 12x + 8x0 + 16 = 0


=%26gt; x^2 -12x + 16 = 0


Solving for x , you will get the coordinates for A and B as follows:A(6+2√5,0) and B(6-2√5,0). Hence the length of AB


= 4√5 units
Reply:We need to put this in the form (x-a)^2 + (b-y)^2 = r^2, and we get (x-6)^2 -36 + (y+4)^2 -16 +16 = 0. This simplifies to (x-6)^2 + (y+4)^2 = 36. This takes care of parts a and b. Substitute y = 0 in this, solve for the two values of x, take their difference, and you're done.
Reply:Perhaps this may help:





The center of a circle is defined as (h,k)





h is the x value, k is the y value





in order to find (h,k) you have to get the equation into the form





(x-h)^2 + (y-k)^2 = r^2 r here is the radius





to put your equation in to the right form you must group the x values and the y values.





so you get: x^2 -12x + y^2 + 8y= - 16


(note that the 16 was brought over to the other side)





now lets work with x and y separately





right now we have x^2 - 12X


we must complete the square. take the -12 and cut it in half.


we now have 6. square this number to get 36





[Make sure you add the 36 to the -16 on the other side of the equal sign!]





so now you have x^2-12x+36


Factor this to get (x-6)^2





now do the same for the y: cut the 8y in half, square it, add that value to the -16 on the other side, and factor.


this should lead you to (y+4)^2





now all in all you should have (x-6)^2 + (y+4)^2 = 36


(the 36 comes from [ -16+36+16]





so looking at this equation we can tell that the center of the circle is (6, -4)


to find the radius we remember that (x-h)^2+(y-k)^2=r^2


in this case r^2 = 36 so r equals the square root of 36 which equals six.


I hope this helps you with the first questions of your homework and should you need further help you might find it at http://www.analyzemath.com/CircleEq/Tuto...
Reply:(x-6)^2 + (y+4)^2 = 36+16-16 = 36





[(x-6)/6]^2 + [(y+4)/6]^2 = 1





origin (6,-4)


radious 6
Reply:center is(-a/2,-b/2)=(12/2,-8/2)=(6,-4)
Reply:As many have said,


(x - 6)^2 + (y + 4)^2 = 36.





The x-axis is y=0, so the two x-values are the solutions of


(x - 6)^2 + (0 + 4)^2 = 36;


i.e.


(x-6)^2 = 20; x = 6 ± √20 = 6 ± 2√5.





The distance between the two is


(6 + 2√5) - (6 - 2√5) = 4√5
Reply:First of all, complete the square to get the equation in the form


(x - x0)^2 + (y - y0)^2 = r^2





(x^2 - 12x) + (y^2 + 8y) = -16





(x^2 - 12x + 36) + (y^2 + 8y + 16) = -16 + 36 + 16





(x - 6)^2 + (y + 4)^2 = 6^2





a) From the equation above, x0 = 6 and y0 = -4, so the coordinates of the center are (6, -4).





b) Again, from the equation above, r = 6.





c) Simply draw a circle centered at the point (6, -4) with a radius of 6 units.





d) I'm not sure what you mean by AB. More information is needed.
Reply:x^2 - 12x + y^2 + 8y = -16.


(x - 6)^2 + (y + 4)^2 = -16 + 36 + 16


(x - 6)^2 + (y + 4)^2 = 36.





A) Center is located at (6, -4).


B) The radius is 36^.5 = 6 units.





D) I'd help you with the length of AB, but you didn't even mention A or B in your answer.