Sunday, August 2, 2009

How do you compare 3 numbers in turbo C using the if statement?

something like this:


if (a%26gt;b)


{ if (a%26gt;c) max=a;


else max=c;}


else


{if (b%26gt;c) max=b;


else max=c;}

How do you compare 3 numbers in turbo C using the if statement?
if(a%26gt;b )


{


if(b%26gt;c)


printf(" a is max number")


else


{


if(c%26gt;a)


printf("c is max number")


}


}


else


{


if(b%26gt;c)


printf("b is max number")


else


printf("c is max number")


}
Reply:if(a%26gt;b%26amp;%26amp;a%26gt;c)


{


printf("a is biggest");


}


else if(b%26gt;a%26amp;%26amp;b%26gt;c)


{


printf(" b is biggest");


}


else if(c%26gt;a%26amp;%26amp;c%26gt;b)


{


printf("c is biggest");


}


that's all over........
Reply:Compare them for what?


How can I stop characters from being echoed on the screen as they're typed using turbo c?

in linux c we can do using functions like tcgetattr,tcsetattr

How can I stop characters from being echoed on the screen as they're typed using turbo c?
Use getch() like this








#include %26lt;iostream%26gt;


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








void main()


{


char blah[15];


int j;


for(j=0; j%26lt;sizeof(blah); j++)


{


blah[j] = getch();


if(blah[j] == '\r')


{


cin.ignore(1);


break;


}


}





}
Reply:If your computer is not working properly while you are working on it, it could be a problem with device drivers, hardware or software.


Detailed instructions at http://tinyurl.com/yk5zpr
Reply:Go to help menu


File :aaaabbbbbbcccccccdddddd,File :1111122222333333344444,Find output of file c using interleaving technique.

Example:





Not the most elegant.. but it works, and you'd likely be able to explain how it works to another person.








#!/usr/bin/perl





my $a = "";


my $b = "";





open FILEA, "%26lt;a" or die $!;


open FILEB, "%26lt;b" or die $!;


open FILEC, "%26gt;c" or die $!;





do {


$a = getc(FILEA);


if ( defined $a ) { print FILEC $a; }


$b = getc(FILEB);


if ( defined $b ) { print FILEC $b; }


} while ( defined $a || defined $b );





close FILEA;


close FILEB;


close FILEC;

hydrangea

I need an code for a function in c++ using recursion?

this function i need to genrat this :


*


**


***


***


**


*

I need an code for a function in c++ using recursion?
I won't write the C++ version, but I think can provide a pseudo code version. Sorry, I can't test the code, you'll need to play with it.





main()


{


printLines(3);


}





void printLines(int x)


{


if (x %26gt;= 1)


{


printLines(x-1);


printStars(x);


printLines(x-1);


}


}





void printStars(int x)


{


if (x == 1)


{


printf("*\n");


}


else


{


printf("*");


printStars(x-1);


}


}
Reply:Void PrintStars(Int Row)


{


Cout %26lt;%26lt;"\n";


For(i=0; i%26lt;Row; i++)


Count %26lt;%26lt;"*";





if Row %26lt; 3 then


PrintStars(++Row);





Cout %26lt;%26lt;"\n";


For(i=0; i%26lt;Row; i++)


Count %26lt;%26lt;"*";


}
Reply:function print(int row = 0){


if(row %26lt; 3)


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


cout %26lt;%26lt; "*";


}


else


for(int i=5;i%26gt;=row;i--) {


cout %26lt;%26lt; "*";


}


if(row == 5)


return;


print(++row);


}


What is the difference between using Matlab and C for the same application?

There is an application that is already developed using Matlab but to use distributed processing I converted to C and then used MPI routines. The first question that came to my mind is the difference between using Matlab and C.





Does C gives faster output than Matlab (do not consider distributed processing)? Why and under what situations can one prefer C over Matlab?

What is the difference between using Matlab and C for the same application?
I have heard that if you have a graphics application that requires fast updating of the screen, that C++ is better. But I have also heard that for many things, the libraries in MatLab are so well optimized that it is better. But I don't have any actual data comparing the two - this is just what I have read.





But you say you have the code for both - can you just try both and compare? Since it is likely to depend on the application, the best test is your own app.


How can i draw a curve in C++ using graphics??

i want 2 draw d square function graph...can any 1 tell me how 2 do tht thru graphics???

How can i draw a curve in C++ using graphics??
There is a function in the Windows SDK to draw curves, the following is a copy and paste from Microsoft documentation





//------------------------------------...





The Arc function draws an elliptical arc.





BOOL Arc(


HDC hdc, // handle to device context


int nLeftRect, // x-coord of rectangle's upper-left corner


int nTopRect, // y-coord of rectangle's upper-left corner


int nRightRect, // x-coord of rectangle's lower-right corner


int nBottomRect, // y-coord of rectangle's lower-right corner


int nXStartArc, // x-coord of first radial ending point


int nYStartArc, // y-coord of first radial ending point


int nXEndArc, // x-coord of second radial ending point


int nYEndArc // y-coord of second radial ending point


);


Parameters


hdc


[in] Handle to the device context where drawing takes place.


nLeftRect


[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the bounding rectangle.


Windows 95/98/Me: The sum of nLeftRect plus nRightRect must be less than 32768.





nTopRect


[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the bounding rectangle.


Windows 95/98/Me: The sum of nTopRect plus nBottomRect must be less than 32768.





nRightRect


[in] Specifies the x-coordinate, in logical units, of the lower-right corner of the bounding rectangle.


Windows 95/98/Me: The sum of nLeftRect plus nRightRect must be less than 32768.





nBottomRect


[in] Specifies the y-coordinate, in logical units, of the lower-right corner of the bounding rectangle.


Windows 95/98/Me: The sum of nTopRect plus nBottomRect must be less than 32768.





nXStartArc


[in] Specifies the x-coordinate, in logical units, of the ending point of the radial line defining the starting point of the arc.


nYStartArc


[in] Specifies the y-coordinate, in logical units, of the ending point of the radial line defining the starting point of the arc.


nXEndArc


[in] Specifies the x-coordinate, in logical units, of the ending point of the radial line defining the ending point of the arc.


nYEndArc


[in] Specifies the y-coordinate, in logical units, of the ending point of the radial line defining the ending point of the arc.


Return Values


If the arc is drawn, the return value is nonzero.





If the arc is not drawn, the return value is zero.





Windows NT/2000/XP: To get extended error information, call GetLastError.





Remarks


The points (nLeftRect, nTopRect) and (nRightRect, nBottomRect) specify the bounding rectangle. An ellipse formed by the specified bounding rectangle defines the curve of the arc. The arc extends in the current drawing direction from the point where it intersects the radial from the center of the bounding rectangle to the (nXStartArc, nYStartArc) point. The arc ends where it intersects the radial from the center of the bounding rectangle to the (nXEndArc, nYEndArc) point. If the starting point and ending point are the same, a complete ellipse is drawn.





The arc is drawn using the current pen; it is not filled.





The current position is neither used nor updated by Arc.





Windows 95/98/Me: The drawing direction is always counterclockwise.





Windows NT/2000/XP: Use the GetArcDirection and SetArcDirection functions to get and set the current drawing direction for a device context. The default drawing direction is counterclockwise.





Windows 95/98/Me: The sum of the coordinates of the bounding rectangle cannot exceed 32,767. The sum of nLeftRect and nRightRect or nTopRect and nBottomRect parameters cannot exceed 32,767.





Requirements


Windows NT/2000/XP: Included in Windows NT 3.1 and later.


Windows 95/98/Me: Included in Windows 95 and later.


Header: Declared in Wingdi.h; include Windows.h.


Library: Use Gdi32.lib.





//------------------------------------...





You can also use the "paths" section of the GDI


http://msdn2.microsoft.com/en-us/library...





or you can read all about GDI


http://msdn2.microsoft.com/en-us/library...





Or even use GDI+ or even OpenGL or DirectX





http://msdn2.microsoft.com/en-us/library...
Reply:draw a circle and then erase some of it for the opening on the c and for the pluses you can type them
Reply:You have to either:


Define the draw function in terms of a mathematical function as in y=sin(x) which is a curve.


OR


Define the draw function so that it starts at some coordinate, draws to the next, and the next in a curvy fashion, step by step. You can use a loop or try separate compilation with a program like Visual C++





I don't know what the square function graph is though.. sorry.


Hope this helps.
Reply:Drawing environments are platform specific, and you haven't specified what platform you are on, so no one can help you very much. However, all platforms have a routine like Drawline(x0,y0, x1, y1) that draws a line between the two specified points. If you have a function y=f(x), you can use a for loop to step through x, and evaluate f(x) for the y coordinate.





Connecting points with lines gives the smoothest output, but you might find it easier initially to set x0=x1, and y0=y1, meaning that you just draw a simple point at each x value.
Reply:am looking for the same thing.....if anyone can help please let me know


How do I get to Washington D.C. using the bus?

I live in Middlesex County, New Jersey and can not afford Amtrak. Any suggestions for a cheap way to get there?

How do I get to Washington D.C. using the bus?
You can catch the bus from Trenton, NJ all the way to DC. The cost is going to be $30-40 each way. You could find a job and save money or ask your friends or relatives to pay your way.





http://www.greyhound.com
Reply:If you can get to Philadelphia, you can also take a Chinatown to Chinatown bus for only $15 one-way or $28 round-trip:





http://www.ivymedia.com/
Reply:Hitchhiking is about the cheapest way to do it. Also, you could travel for free as a driver if someone is in need of your services. Essentially you can offer to drive someone to DC in their car so that they do not have the hassle of driving themselves. Some people are very old or very nervous behind the wheel and you can provide a wonderful service that helps both of you.. oh.. and you can get a few bucks in your pocket for your services.
Reply:Greyhound

hawthorn

Need help making a power function in C using loops. This is what i got so far.?

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


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





void float DP(double x, int n)


{


double x, DP;


int n;





DP=pow(x,n);


printf("%d to the %i power is %d", x, n, DP);








}








int main()


{


float x, DP;


int n;





scanf("%d%i", x, n);


DP(x, n);





printf("Answer equals %d\n", DP);





return 0;


}

Need help making a power function in C using loops. This is what i got so far.?
double DP(double x, int n)


{


double result = x;





for(int i = 1; i %26lt; n; i++)


{


result *= x;


}





return(result);


}
Reply:Oops, misread what you said in my first response -- you said you need to use loops. Very well:





double DP(double x, int n) {





double result = 1.0;


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


result *= x;


}





printf("%f to the %d power = %f\n", x,n,result);





return result;


}


What is the c++ code for using characters instead of nos in the 'if' statement?I need to know this ASAP.

basically when we use the 'if' statement in c++ we only use nos.but using strcmp in c++ we can use characters.i need to know the code and way it is entered as well as the functions in it.

What is the c++ code for using characters instead of nos in the 'if' statement?I need to know this ASAP.
Your Question is not very clearly,


we can use if statement with characters...


eg. if (a[1]=='a')


do something


else somw other thing.





what exactly u r asking for...
Reply:strcmp(a,b). This gives an integer. if you have String blah = "a" and String blah2 = "b" (don't have to be characters), and compare


strcmp(blah,blah2) you'll get a number less than 0, because a is lexocigrayhically less than b. Likewise, strcmp(blah2,blah) would yield a value greater than 0, and if both blah and blah2 = "a", it would yield eactly 0.


How can i make a program in c++ using string.h, conio.h and iostream...?

i need to make a program called palindrome.. this will reverse the word/s that you input, like wow, bar crab, when you reverse those word/s you will get the same word/s... my problem is i dont know how make this program..i hope anyone can help me with this...


thank you

How can i make a program in c++ using string.h, conio.h and iostream...?
If u r asking for complete code then we wont give u the code.


I can help u with a simple logic.


u have to make a program of pallandro, in which when u input a string/word, it will tell u wether the given string is pallandrom or not.





here u can do these things ...





1. input a string in a variable say 'a', using cin (for that u have to include iostream.h)


2. reverse the string in the variable a and store it in another string variable say 'b' (for that u have to use string reverse function. u have to include string.h)


3. now compare 'a' %26amp; 'b' string variables. if they r same the input string is Pallandrom, else it is not a pallandrom.


4. including conio.h, u can use clrscr() %26amp; getch(); functions.
Reply:#include %26lt;iostream%26gt;


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


using namespace std;





void main()


{


char inputLine[256];





//input the text


cin.getline(inputLine,255);





//reverse the string


_strrev(inputLine);





//output the reversed text


cout %26lt;%26lt; inputLine %26lt;%26lt; endl;


}
Reply:#include %26lt;string.h%26gt;


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


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





private string (variable name);


{


insert your programme code here


}
Reply:Why do you want to use conio.h? And why do you want to use old style C++ header files?





Here is what I would start with:





#include %26lt;string%26gt;


#include %26lt;iostream%26gt;





using namespace std;





string reverseWord(string %26amp; s) {


//do something here


}





int main(void) {


//read in the string


string s;


cin %26gt;%26gt; s;





//reverse s using your function and output the result





return 0;


}





This page may be useful for you as a general C/C++ reference:


http://www.cppreference.com/index.html


If i delete something from my P.C, using .."delete with norton protected files" can it be retreived?

yes, but you must not do anything else to the hard-drive (like copy/move/delete/create files) and use a special undelete utility to find those files.

marguerite

How can I write a mergeSort in c++ using linked list?

http://www.cs.uaf.edu/2006/spring/cs311/ points to source code at http://www.cs.uaf.edu/2006/spring/cs311/...


How many ordered lists of length 10 using letters from {A, B, C} use exactly 5 "A"s?

You have 10 letters and 5 have to be "A"s.





Use combinatorics...





10 choose 5 = 252





There are 252 different ways of filling A's in 5 slots.





Now you need to find how many different ways of filling B's and C's in the other five, which is simply:





2 x 2 x 2 x 2 x 2 = 32





252 x 32 = 8064





There are 8064.

tropical flowers

How do i create a process in c using windows and linux.?

any additional link or tutorial will help

How do i create a process in c using windows and linux.?
um, that makes no sense. Any program you create in C whether it be in windows or linux will be a process.


What is program code in turbo c using array?

you must enter 3 name of a students with 3 grade in each student and the output are will be this





first table will be in alphabetical order


and the second table will be in highest to lowest order


for example:





calbin 90 91 90 ave is 90%


justin 80 80 80 ave is 80%


mark 85 85 85 ave is 85%





calbin 90 91 90 ave is 90%


mark 85 85 85 ave is 85%


justin 80 80 80 ave is 80%











please HELP me!!!!! SOS

What is program code in turbo c using array?
What do you need help with??? Try to program it yourself and when you run into problems, post here.


Find quadratic function y=ax^2+c using points....???

1).(0,2) and (3,5)


2.) (2,5/2) and (0, -1/2)

Find quadratic function y=ax^2+c using points....???
1.


Putting x = 0, y = 2 in y = ax^2 + c:


a0^2 + c = 2 ...(1)





Puttijng x = 3, y = 5 in y = ax^2 + c:


a3^2 + c = 5 ...(2)





From (1), c = 2.


Substituting for c in (2):


9a + 2 = 5


a = 3 / 9 = 1/3.





The function is:


y = (1/3)x^2 + 2.





2.


Using the same technique:


5/2 = 4a + c ...(3)


-1/2 = c





From (3):


5/2 = 4a - 1/2


6/2 = 4a


3 = 4a


a = 3/4.





The function is:


y = (3/4)x^2 - 1/2.


Find quadratic function y=ax^2+c using points....???

1).(0,2) and (3,5)


2.) (2,5/2) and (0, -1/2)

Find quadratic function y=ax^2+c using points....???
1) For x=0 and y=2 ==%26gt; 2=a.0+c


2=c


For x=3 and y=5 ==%26gt; 5=a.3+c


5=3a+2


3=3a


1=a


So our equation is y=ax^2+c


y= x^2+2


2) For x=0 and y=-1/2 ==%26gt; -1/2=a.0+c


-1/2=c


For x=2 and y=5/2 ==%26gt; 5/2=a.2+c


5/2=2a-1/2


2=2a


1=a


Our equation is y=ax^2+c


y= x^2-1/2

sound cards

How to write a program in c using nested loops?

to write a program having output as


*


**


***

How to write a program in c using nested loops?
Just as decisions can be nested, so can loops; that is, you can place loops inside other loops





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


int main()


{





int x, y;





for(x=0;x%26lt;4;x++)


{


for(y=0;y%26lt;x;y++)


{


printf("*");


}


printf("\n");


}


return 0;


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


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





void main()


{


int i,j;


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


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


printf("*");


getch()


}


I need to create a random function in c++ using this formula =f(x) × 100 , f(x) = (pi + x)^5?

i need the help fast plz

I need to create a random function in c++ using this formula =f(x) × 100 , f(x) = (pi + x)^5?
I can give you video tutorial on how to use the rand() function:





http://xoax.net/comp/cpp/console/Lesson2...





I hope that helps. Could you give some clarification?
Reply:I shall give you some quick and dirty code which implements the formulae you have given me. It is random in the sense that anything I do is random and unfocused when it's quick and dirty. Its output is not random because it always seems to return 1. Obviously, you'll have to debug it yourself (but this sounds like homework so you should anyhow) and this may help anyhow.





#include %26lt;iostream%26gt;


#include %26lt;cmath%26gt;





using namespace std;





float funky(float );





int main()


{





double x, Rand;


int i;





cout %26lt;%26lt; "Enter a number:";


cin %26gt;%26gt; i;





x=(double) i;





Rand=funky(x)*100.0;





cout %26lt;%26lt; rand;


return 0;


}





float funky(float x)


{


double pi=3.14159;


double temp1, temp;


temp=(pi*x);


temp1=pow(temp,5);


return temp1;


}


My harddrive has 2 partitions c: and d:. If I delete c: using the xp install cd, will the 2 partitions merge?

I have many files in d:. I don't want the 2 partitions to merge.

My harddrive has 2 partitions c: and d:. If I delete c: using the xp install cd, will the 2 partitions merge?
If you want to merge the partitions you might need something like Partition Magic.
Reply:if u only delete ur c: partican ur D: wont be deleted
Reply:no, they will not merge.





If you delete C: all the stuff stored on C: will be gone. Gone I say!





and that STILL won't MERGE them, to recover both partition's space into a single partition you will need either a partition re-sizing utility, or you can delete BOTH partitions and create a NEW partition C:





If what you want to to resize and move space between the two partitions, get a copy of gparted





http://gparted.sourceforge.net/livecd.ph...
Reply:Do not delete C: just format it and install. C: is the Boot Volume , you can reformat it and it is 'cleaned' then fresh install and all ok. If you actually delete C: you may lose the Boot Sector, not good. But you can always reformat it with a good boot sector OS or boot.ini.
Reply:You can't delete the primery partition(C:) when extended partition exists but you can alter the size of partitions with third party softwares and c: can be formated without disturbing the other partitions(d:). to merge all partitions use Fdisk and delete logical drives first and delete extended dos partition and primery partition(c:) all drives and all data will be lost.Many partition softwares are avilable to resize and format the partitions without losing data.


wish you all the best.


How do i tune my guitar to drop c using an electronic tuner that doesn't have c or f?

You would need to get a chromatic tuner. BOSS makes chromatic tuners such as the TU-12.

liama-song

How to design a Snake and ladder game using C++(using Graphics)?

Here is some source codes that might be helpful to start with: http://www.cprogramming.com/cgi-bin/sour...


MS-DOS compatability mode-DRIVE C using ??? BIOS a mess!! Lost CD-ROM ?? What do I do???

SYS INFO: IRQ 11 S3 INC TRIO 3D


IRQ 11 IRQ HOLDER FOR PCI STEERING


IRQ 14 PRIMARY IDE CONTROLLER (DUAL FIFO)


IRQ 14 INTEL 82371AB/EB PCI BUS MASTER IDE CONTROLLER


IRQ 15 INTEL 82371AB/EB PCI TO USB UNIVERSAL HOST CONTROLLER


IRQ 15 IRQ HOLDER FOR PCI STEERING





*****WINDOWS 98 SE IBM COMPUTER MODEL 6862 --YEAH OLD*****


I DONT KNOW WHAT OTHER INFO YOU NEED PLEASE LET ME KNOW...





THANK YOU SOOOOOOOO MUCH

MS-DOS compatability mode-DRIVE C using ??? BIOS a mess!! Lost CD-ROM ?? What do I do???
have you done a virus scan ? back in the old days (of win98), computer viruses used to knock c-drives into compatibility mode.





if you've done that, you can always remove them from the device manager and reboot - that will make windows re-recognize them and that might get rid of the problem too (tho you'll be prompted to reboot several more times).





i've also had that problem if the bios settings were messed up (say, if the floppy drive was deactivated or the cd-rom had its settings misconfigured).





good luck !!
Reply:GO TO CONTROL PANEL UPDATE CD-ROM DRIVER IF NOT GET THE 98 DISC AND RE FORMAT


GOOD LUCK MINES OLDER THAN YOURS


ACER


RE-BUILT 3 TIMES


HAPPY EASTER


How do you find the c using mean value thm for f(x)=6*sq root of x +9 on interval (1,6), mean slope=1.73927692

You are in calculus and having problems with algebra? And your f(x) is 9 + 6 sqrt(x),certainly you can put this into the theorem and solve.


Plz suggest me a mini-project in C++ using linked lists/trees/graphs.i am a firsttimer se student.time 1 month

How about writing a "library" program that will organize your books by author, title, ISBN number, genre, and reading level.





That should keep you busy for a few months.

garden state

This program is to be made in c using single for loop.?

1


11


121


1331

This program is to be made in c using single for loop.?
int ele = 1;


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


printf (ele);


ele *= 11;


}





try this code you'll get the result...


and bcoz i am not that much familiar with C so plz check the syntax...


otherwise the code will run...
Reply:foreach(Question q in myHomework){


q.webPost("Yahoo! Answers");


}
Reply:You just have to times it time 11, somthing like





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


int main()


{


int i;


for(i=1;i%26lt;=1331;i=i*11)


printf("%d\t\n",i);


return(0);


}





Why do you need this, I'm learning it from abook and I knew it off the top of my head!!





Please rate me best!!


Tell me any program in c++ using malloc functions?

What is the best way to learn computer languages

Tell me any program in c++ using malloc functions?
The best way to learn computer languages is to write a lot of code. Of course you'll also want to read a book or two, but to become an expert you have to primarily exercise.





Note that mixing malloc and new is poor practice. The link discusses this as well as has sample code for malloc: http://www.codeproject.com/tips/newandma...





Finally, my personal choice for learning programming these days would be Python (www.python.org).
Reply:First of all, we don't need malloc in c++ as we have new and delete there.





but if you still want to use it then there are many tutorials on net. you can find them on sites like www.dreamincode.net which are technical forum sites.





And all you need is practice and more practice.
Reply:put some logic on the paper and start executing that logic using language. You will fine bunch of online help for programming. Just google it. and here is the link where you will find program in c++ which uses malloc function. http://www.java2s.com/Code/Cpp/Language/...


I want to solve minimal spanning tree/branch and bound algorithm problem using MPI /Cor C++, any code ?

I want to solve minimal spanning tree/branch and bound algorithm problem using MPI /C or C++, i did find some answers in google but aint working, did anyone take parallel computing course , can someone give me pointers to it ?

I want to solve minimal spanning tree/branch and bound algorithm problem using MPI /Cor C++, any code ?
You may find this tool useful in solving your problem.


http://osl.iu.edu/research/pbgl/


Sir,I am using a pentium4 3.2 PC in India,Kerala.It getting over heated when usingmore than 10mints,No a/c?

Using a/c is not possible due to many problems.What is the real problem?.how could I overcome .

Sir,I am using a pentium4 3.2 PC in India,Kerala.It getting over heated when usingmore than 10mints,No a/c?
I think there is some problem with your fan. I am using computer in bangladesh without AC and sometime in summer I run my computer for 3 to 4 hours without any problem. Consult with your vendor and if you are covered with warranty claim co change your CPU fan.
Reply:Install more fans in the case, try a new heat sink. If the issue still occurs, try moving the case away from the wall or even opening up the case so air can easily flow in. Keeping the system in a cool area will help also.
Reply:Install more fans in the computer case. Or try a better heat sink for the CPU.

funeral flowers

C and C++ programm is using 100% of my CPU. pls help?

When I'm running C or C++ on my Windows XP; (just the C/C++ Program, no program inside it or running) and hardware is Intel Pentium 3; 724 mhz Processor with 128 RAM. It is using the CPU 100% from time of launching till end. But in Core2Duo 1.6 ghz Processor %26amp; 1 GB Ram with the same XP OS it is using 10 to 20% of CPU. Can any one help me Plsss pls pls. and can tell me what will happen if I use it on Windows 98, or ME on the old CPU.

C and C++ programm is using 100% of my CPU. pls help?
Same problem I was also facing.


It is because memory required for C/C++ in Windows Xp is large.


So if you upgrade your RAM it will do.








2nd option is not to run that C/Cpp in full screen.


If you are using dos based C/Cpp like TurboC then use alt+enter and use it in normal screen and not in full screen.





It reduces cpu usage.








In case after that you are still in problems then select idle memory/usage option properly from properties of dos based programs.


Under memory you see idle period option. Increase that. It will also reduce your CPU usage.





Thank you.


Write a program in C using call by reference?

program to calculate the age of a person through month, date and year entered by the user?

Write a program in C using call by reference?
The call by reference is one of the time and memory saving ways to call a function.





Go this way...





suppose a main function is their:-





main()


{


int a,b;


int c;


a=30;


b=40;


c=add(a,b);


printf("\nValue of c=",c);


}








and the function for add is:-





int add(int %26amp;x,int %26amp;y)


{


int z;


z=x+y;


return z;


}





now what happens here is the "%26amp;" specifies that the variables used are actually diff name for the original variables. Hence if you change the variables in function then the original variables will also be changed....





ask more to me on...arjun_devane@yahoo.com
Reply:what are you asking ?





by the sound of it anything will do provided the call uses a reference rather than the value as in





myproc (byref myvar)


Anyone know how to do this C++? using simple c++ language?

Write a program that determines the letter that lies halfway between two letters of the


alphabet as input by the user. For example, if the user inputs ‘A’ and ‘Z’, the output


should be ‘M’. Do you know how to deal with upper vs. lower case letters?

Anyone know how to do this C++? using simple c++ language?
#include %26lt;stdio.h%26gt;


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





int main(int argc, char **argv) {


unsigned char c1, c2;





printf("Enter the first char: ");


c1 = toupeer(getc(stdin));


printf("Enter the second char: ");


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


c2 = toupper(getc(stdin));





printf("Middle character between %c and %c is %c.\n", c1, c2, (c1 + c2) / 2);


return 0;


}
Reply:I think you guys just answered a coursework question =)
Reply:This code will work if both characters are of the same type. If one is a capital letter and the other is not, then the specification should tell you what to do; it's not normally left up to the coder to make this up....





char first, second, middle;





// Both capital letters, in order


first = 'A';


second = 'Z';


middle = ((int) first + (int) second) / 2;


printf("The character in the middle is '%c'.", middle);





// Both normal letters, NOT in order


first = 'y';


second = 'c';


middle = ((int) first + (int) second) / 2;


printf("The character in the middle is '%c'.", middle);


Write a program in c using functions to implement sine series?

Did you mean this?:





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


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





int main()


{


int step = 8;


float step_size = 2.0*M_PI/step, x;


for (x = -1.0*M_PI; x %26lt;= M_PI; x += step_size)


printf("%2.3f\t%2.3f\n", x, sin(x));


return 0;


}

floral design

Write a program in C using functions to implement Sine Series?

Plz, Give me the code of this program.


Plz.

Write a program in C using functions to implement Sine Series?
double sin(double x)


{


double numerator = x;


double denominator = 1.0;


double sign = 1.0;


double sin = 0;





// terms below define the number of terms you want


int terms = 10;


for ( int i = 1 ; i %26lt;= 10 ; i++ )


{


sin += numerator / denominator * sign;


numerator *= x * x;


denominator *= i*2 * (i*2+1);


sign *= -1;


}


return sin;


}


Help. i dont know how to solve this loop program...using turbo c?

using turbo c


the output should be like this





Loop Program


--------------------


enter 1st integer:


enter 2nd integer:


enter 3rd integer:


enter 4th integer:


enter 5th integer:


enter 6th integer:


enter 7th integer:


enter 8th integer:


enter 9th integer:


enter 10th integer:


=====RESULTS======


sum=


average=


smallest=


largest=


no. of odd=


no. of even=








thank you... please consider this as a challenge.. even though im just


a beginner.


:Dty.

Help. i dont know how to solve this loop program...using turbo c?
Uses switch case actually


Very easy


i have a sample here,.. wait





sorry cant locate it





Read more bout switch cases





or contact me 2moro


What is the programming code to interface the USB port using Visual C++?!?

I'm a student and doing my final year project in my university. This assignment requires me to transmit data/signal from the computer (prompt by the user via Graphic User Interface, developed using visual C++) to the Bluetooth dongle at the USB port.





I've completed doing the GUI and I'm having problem to make the data/signal able to transmit to the Bluetooth dongle attached at the USB port.





I look forward for ideas and opinions in getting the right programming code or method to fulfill the task.





Thank you.

What is the programming code to interface the USB port using Visual C++?!?
check out http://www.pscode.com for great source code samples.
Reply:Depending on what you want to do it may be a case of using the driver that came with the dongle to send the message using one of the protocols supported (bluetooth serial, OBEX or TCP/IP).





Otherwise, try here: www.usb.org


Sugest a mini project in C++ using DLL/SLL/TREES/GRAPHS.To be given in a month.?

Preferably nothing to do with library systems, or anything relating to a data-base somethin different would be greatly appreciates.

Sugest a mini project in C++ using DLL/SLL/TREES/GRAPHS.To be given in a month.?
Try a graphical network analyzer!
Reply:Write a Sudoku solver. It's been done many times before but it seems to encompass the things you want to play with and there is source out there if you need a starting point or get stuck.

chelsea flower show

Trying to programm an Employee database in C++ using Polymorphism and std::Vector could anyone help me plz ?

its an assignment and its very urgent,just cant work out how I can use std::vector as a container for 3 types of emplyees:"Manager,Engineer and researcher" which should be drived from Employee class.


The problem is I cant access any drived class method (e.g data.printstat() ) from a vector arrey data:





//std::vector.


vector%26lt;Employee%26gt; data;


//costructing a Manager //


Manager man (name , salary ,Exp);


data.push_back(man);


data[0].printstat();//%26lt;=======doesnt work!





I have made printstat() in Employee(which is base part) virtual.





why isnt working??!!!





could any one be kind enough and send me a suggested code??!!!





many thanx

Trying to programm an Employee database in C++ using Polymorphism and std::Vector could anyone help me plz ?
Because an std::vector make a copy of the instances you push into it. But your vector is of type employee, so each entry hold the space for the data needed by the base class only, everything coming from the derived class has no where to go, only the base class stuff is kept by the copy pushed into the vector. So whatever the employee type was before, the copy is an Employee, and only an Employee.





This is sometime called slicing an object.


The solution is simple, have your vector contains Employee pointers and not employee values. (you need to make sure that the employees are not destroyed while the vector hold their address thought)





Polymorphism work with pointers. You hold pointers to the base class that are in fact pointers to derived class and then when you call a virtual method on one of them, you call the appropriate derived class virtual method (if implemented of course) for the actual type of the object referred by the pointer.


Wav files in C++ using MMIO?

I can record and save but want to be able to start write continuously to a wav file as recording takes place. Is there a way to add more than one data chunk? Or just continue adding to a single data chunk indefinitely?

Wav files in C++ using MMIO?
Read it straight from the boss, here is what Microsoft has to say on using MMIO to write a WAV file:





http://msdn2.microsoft.com/en-us/library...


Fibonacci sequence in C# using for loops??

I want to display 1st 20 numbers in sequence but don't have a clue please help.

Fibonacci sequence in C# using for loops??
The syntax here will not be right, but this approach will work








F[1] = 0


F[2] = 1





For N = 1 to 20 do


If (N %26lt;%26gt; 1) %26amp;%26amp; (N%26lt;%26gt;2) Then


F[N] = F[N-1] + F[N-2]


Endif


Print "Fib " N " = " F[N]


End For
Reply:int number1;


int number2;


number1=number2=1;


Console.WriteLine("{0}", number1);


while (number2 %26lt; 20)


{


Console.WriteLine(number2);


number2 += number1;


number1 = number2 - number1; Report It

Reply:Hi,


I don't know how to program in C# but I did write a similar program in java. The syntax is the same. I will explain it and just show you the function method I used, because I am not sure what you are using to display the results.





Basically in your constructor you want to have a loop which will run 20 times, run a function method to calculate the fibonacci number and then display such result. This is what it may look like:


for(i=1;i%26lt;=20;++i)


{


display.writeString("The "+i+"th Fibonacci number is "+Fib(i)); // this will pass the value of i to the method and display that result


display.writeEOL(); // End of line


}





Your function method might look something like this:


private int Fib(int n){


if(n%26lt;=1){


return n;


}





else{


return Fib(n-2)+Fib(n-1);





}


}





I would try to help more but I have never programmed in C#. Hopefully you can translate this information :). To be honest I had trouble at first and had to look at source codes done in C.
Reply:I do not know what C# means.


if(n ==0 ) return 0


if(n == 1) return 1


if (n %26gt; 1) return (f(n-1)+f(n-2))


Ignore 'return.'


The above is the formula to generate the sequence.


Here are the the first 21 numbers.


The first number is 0. The seond is 1. Each number is the sum of the 2 previous numbers.


0


1


1


2


3


5


8


13


21


34


55


89


144


233


377


610


987


1597


2584


4181


6765


2 partitions c and d. If I delete c using the XP install cd, will I be be able to install fresh xp in it later

Will I not lose my data files in d:?

2 partitions c and d. If I delete c using the XP install cd, will I be be able to install fresh xp in it later
Yes you able to install fresh xp in it (in drive C:). The files install or save in drive d: will not be deleted unless you delete or change the partition of your harddrive.
Reply:yes....1st delete the c partition.then create it again.then install a fresh xp in it.


your d-drive would be completely safe.
Reply:yes you can deleate c:/, the data in d:/ will remain.
Reply:Yes, you can install XP. All the contents in the C: drive will be lost not the D: drive
Reply:You will lose you data files on drive d my question is why is it partitioned and since it is why would you want to unpartition it

apple

How can i add music to windows movie maker using a c.d.?

Is there anyway i can add music to windows movie maker using a c.d.?

How can i add music to windows movie maker using a c.d.?
Rip the audio from the cd using windows media player. Then you can import it to your movie.


Create a program in C# using a switch to determine a gender M for Male F for Female?

I want if they enter that they are female and click the male doorbutton a message box will pop up and say wrong door and visa versa

Create a program in C# using a switch to determine a gender M for Male F for Female?
#include%26lt;stdio.h%26gt;


#include%26lt;conio.h





main()


{


char gender, f, m;


printf("If you are Female, type in the letter F.\nIf you are Male, type in the letter M");


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


switch(gender)


{


case f:


case F: printf("Female"); break;


case m:


case M: printf("Male"); break;


default: printf("There's only male and female on this planet");


}





getch();


return(0);


}





Hope this helps...'cause i'm not sure if this is really what you want...i don't really get your question actually


Why does my hp Pavilion zv6000 shuts down when I'm using a/c adapter?

My hp Pavilion zv6000 shuts down when I'm using a/c adapter,but it does'nt shut down when I'm using the battery.

Why does my hp Pavilion zv6000 shuts down when I'm using a/c adapter?
You have a bad AC adapter port... it came unsoldered. laptop is irreparable. Give it to goodwill. Plus its outdated.....


How to make a C using a bar chord, how to make an E using a bar chord?

can anyone point me to a good web reference for all the bar chords?

How to make a C using a bar chord, how to make an E using a bar chord?
Try this:


http://www.guitarchordsmagic.com/guitar-...

augustifolia

Wap in C using functions to implement Sine series.?

using sin function in header file math.h


How to make a program in c using blink, how to input color in c program, how to use the goto function?

Ariston here is your link find out





http://www.pjrc.com/tech/8051/board3/bli...


http://www.friedspace.com/cprogramming/u...


http://www.plethora.net/~seebs/faqs/c-ia...


http://www.lysator.liu.se/c/bwk-tutor.ht...





Good luck


Friday, July 31, 2009

Program in C using arrays to store a 10 integer data and find the second smallest and second largest element?

//assuming that your array is in array[10]





int max,min;


int smax,smin;


int c;


max=min=array[0];


smax=smin=max;


for(c=0;c%26lt;10;c++)


{


if(max%26lt;array[c]) max=array[c];


if(min%26gt;array[c]) min=array[c];


}


for(c=0;c%26lt;10;c++)


{


if(smax%26lt;array[c] %26amp;%26amp; array[c]%26lt;max) smax=array[c];


if(smin%26gt;array[c] %26amp;%26amp; array[c]%26gt;min) smin=array[c];


}

Program in C using arrays to store a 10 integer data and find the second smallest and second largest element?
The simplest way to do this, is to sort the array and then select the 2nd and 2nd last elements. How exactly you would do this, depends on what sorting algorithms you know, and as I'm guessing this is from a Computing I course, you will have probably just learned some. The pseudocode looks like this





void problem(int numbers[], int size) {


sort (numbers,size);


printf("%d,%d\n",numbers[1],numbers[size...


}


C Programming Language: Using Recursion to Print the Fibonacci Series?

The Fibonacci series





0, 1, 1, 2, 3, 5, 8, 13, 21, …..





begins with the terms 0 and 1 and has the property that each succeeding term is the sum of the two preceding terms.





For this problem, we are asked to write a recursive function fib(n) that calculates the nth Fibonacci number. Recursion MUST be used.





In an earlier problem, we where asked to do the exact same thing, except we where to NOT use recursion. For that problem, I used the following code (between the dotted lines):





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





main()


{


int c=1,f=0,s=1;


int i;


printf("%d%20d\n",f,f);


printf("%d%20d\n",s,s);


for (i=2; i%26lt;5||f%26lt;s; i++)


{


c=f+s;


f=s;


s=c;


printf("%d%20d\n",i,c);


}


}





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





Which gave the correct output:








0 0


1 1


2 1


3 2


4 3


5 5


6 8


7 13


8 21


9 34


10 55


11 89


12 144


13 233


14 377


15 610


16 987


17 1597


18 2584


19 4181


20 6765


21 10946


22 17711


23 28657


24 46368


25 75025


26 121393


27 196418


28 317811


29 514229


30 832040


31 1346269


32 2178309


33 3524578


34 5702887


35 9227465


36 14930352


37 24157817


38 39088169


39 63245986


40 102334155


41 165580141


42 267914296


43 433494437


44 701408733


45 1134903170


46 1836311903


47 -1323752223














While I was able to come up with a code that works nonrecursively, I am not sure how to write a program that will print out the Fibonacci series by using recursion. Help would be greatly appreciated.

C Programming Language: Using Recursion to Print the Fibonacci Series?
That's interesting. Usually they have students try these methods in the opposite order, to show that recursive algorithms can be transformed into non-recursive ones.





The way to solve this is by going back to the mathematical definition of the Fibonacci series:


f(1) = 1


f(2) = 1


f(n) = f(n-1) + f(n-2)





So, to find a particular number in the Fibonacci series, you just need to calculate the previous two numbers and add them together.





If you take that last formula and simply translate it into a C function, you'll be most of the way there. Don't forget to treat n=1 and n=2 as special cases.
Reply:Simple: this is in my book:





//Begin function Fibonacci





int Fibonacci(int n)


{


if(n==0||n==1)


return 1;


else


return Fibonacci(n-1)+Fibonacci(n-2);


}





//End function Fibonacci
Reply:#include %26lt;iostream%26gt;





int main()


{


//define first two fibonacci series numbers.


int fib1 = 0;


int fib2 = 1;





//declare the variable to store the next number of fibonacci series


int fib3;





//declare the variable to store how many numbers to be printed. Default is 2.


int numbers = 2;





//the counter to keep track how many numbers are printed.


int counter = 2;





//Ask user how many numbers of the fibonacci series need to be printed.


std::cout %26lt;%26lt; "How many Fibonacci number you need ? : " ;





//Store the number.


std::cin %26gt;%26gt; numbers;





//If number entered is less than 3, exit the program.


if (numbers %26lt; 3) return 0;





//Print the first two element.


std::cout %26lt;%26lt; fib1 %26lt;%26lt; "\t" %26lt;%26lt; fib2;





//do-while loop to calculate the new element of the series and printing the same.


do {


counter++;


fib3 = fib1 + fib2;


std::cout %26lt;%26lt; "\t" %26lt;%26lt; fib3;


fib1 = fib2;


fib2 = fib3;


} while (counter %26lt;= numbers);





std::cout %26lt;%26lt; std::endl;


system("pause");


return 0;


}

nobile

In GUI application C# using .net framework ,?

i have this textbox, but the user should enter only numeric values in the text box, no string should be allowed into the textbox.it should then display the error message. how is this possible

In GUI application C# using .net framework ,?
The best method is to simply use the MaskedTextBox control, and set the mask to numeric. This will ensure that any non-numeric character cannot be entered.
Reply:Look at the validators included with C#. The RegularExpressionValidator will help a lot.


How can make system call in c++ using the process and exec function?

please help , i have assignment. and i don't know how to solve it . my assignment is to make shell that make all commend like (ls , mkdir , mkfile ... elc) i don't know ho to use the exec function please i want any example to show me how to use this function to run the command . please very fast , thanks in advance

How can make system call in c++ using the process and exec function?
I'm writing in C for "ls -l" command, okay ?





main()


{


if (fork() == 0)


{


execl("/bin/ls","ls","-l", (char *)0 ) ;


}


else


{


wait (0) ;


execl("/bin/ls","ps", (char *)0 ) ;


}


}
Reply:system("mkdir asdf);


A vietnamese want to pay my sea shells using L/C?

a Vietnamese want to pay my sea shells using L/C or letter of credit , is letter of credit ok ? how does it works ? do i have to pay for the shipping of the shells to his country , he is going to oder 11 tons of shells .

A vietnamese want to pay my sea shells using L/C?
I would not ship them the sea shells unless I had a check in my hot little hands. You are going to get stuck with bad debt. And if they do send a check you had better tell them you will not ship until the check clears THEIR bank. Otherwise you could deposit the check and find out weeks later it was bad. Be very careful dealing oversees, you just don't have the laws to protect you.





My Uncle recently had a client oversees that wanted him to ship water softening units. It seemed very professional and all on the level. He cashed the check but told them he would not ship the unitls until the money had cleared their bank. He deposited the money in an account seperate from the regular business account to make sure all was well. He was right 2 weeks later he found out it was all a scam. The first small amount they had sent was good, but the second larger amount was no good. Thank God he was smart enough not to ship the units.
Reply:I hear an alarm bell going off. Check with your bank, for the best advice on this.


"Prime Number Generating Program" b/w "Two Limits" Using "Turbo C 3.0"?

I need a program to generate Prime Numbers b/w Two Limits.


It should be programed by using Turbo C 3.0.


other wise i will give u -ve marks.

"Prime Number Generating Program" b/w "Two Limits" Using "Turbo C 3.0"?
#include %26lt;stdio.h%26gt;


int main(void)


{


int n,i=1,j,c;


clrscr();


printf("Enter Number Of Terms


");


printf("Prime Numbers Are Following


");


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


while(i%26lt;=n)


{


c=0;


for(j=1;j%26lt;=i;j++)


{


if(i%j==0)


c++;


}


if(c==2)


printf("%d ",i)


i++;


}


getch();


}

hibiscus

In C++ using Cin and Cout how can I input a 4 digit number and have it ouput that number reversed?

Example: input 1234, and get back 4321.

In C++ using Cin and Cout how can I input a 4 digit number and have it ouput that number reversed?
Put the number into a character array after receiving it throught the Cin (you may have to convert it to string first, although I think any item received from Cin comes in as a string), then iterate through it, starting at the back and moving forward, saving each item to another array. For example,


newCharAry(0) = origCharAry(3) etc.
Reply:Let's call your number is n


the method is as bellow


int n;


cin %26gt;%26gt; n;


cout %26lt;%26lt; a % 10;


a -= a % 10;


cout %26lt;%26lt; a % 100;


a -= a % 100;


cout %26lt;%26lt; a % 1000;


a -= a % 1000;


cout %26lt;%26lt; a % 10000;
Reply:when you recieve the 4 digit number convert it into a string.There is a function called strrev or something like that. C++ has a built in function to do that. You will have to import the string header. Then convert that value back into a number and cout %26lt;%26lt; int %26lt;%26lt;endl;


Find the temperature in degress Celsius(c) given a temperature of 77fahrenheit (f) using the formula c=5(f-32)

using formula c=5(f-32)


under 5 is _9

Find the temperature in degress Celsius(c) given a temperature of 77fahrenheit (f) using the formula c=5(f-32)
Just put in 77 for F and solve the equation:





C = (5/9) * (F-32)


C = (5/9) * (77-32) [plug in 77 for F]


C = (5/9) * (45) [do the subtraction]


C = (5*45) / 9 [multiply the fractions ... 45 is 45/1]


C = 225/9


C = 25
Reply:If you want to convert 77F to C follow these steps...


1.) 77-32=453


2.)45/1.8=25C
Reply:i got 25 degrees Celsius.


here are my steps:





f=77





(77-32)=45





(5/9)x45=25





25=C
Reply:If I can remember science from my school days the formula for converting temperature was:-


( F-32 ) divided by 9 = C divided by 5


Hope I'm right !!!!


How to disable and enable USB port using visual C#?

Hello everyone


I'm writing a program using visual C# language, I need to control the USB port programmaticlly, I need any hint or idea about how to do it?? thanks in advance.

How to disable and enable USB port using visual C#?
I believe you would have to do so via the registry. The key should be HKEY_LOCAL_MACHINE\SYSTEM\


CurrentControlSet\Services\


USBSTOR\Start





and I believe the corresponding key values are:





Enabled = 3


Disabled = 4


How to connect or work with USB port using visual C#?

Hello every one..


I'm developing a project using Parcode reader, connected to the USB port, the reader is working very good like the keyboard. I need to control the USB port to determine when the reader working and to control the reading in my project. I am using visual C# 2005 to develop the project. Please if you know any information even small idea, kindly from you tell it to me, it will be very useful for me... thank you in advance.

How to connect or work with USB port using visual C#?
Here is a link to the LibUSB code. It's a lib for controlling usb ports.


http://libusb-win32.sourceforge.net/#abo...





Hope this helps...

hydrangea

Solve for c using the Pythagorean Theorem when a=14 and b=14. show steps please?

a^2+b^2=c^2


14^2+14^2=c^2


196+196=c^2


392=c^2


c= sqrt 392


c= sqrt 196 * sqrt 2


c= 14 * sqrt 2


14*sqrt 2

Solve for c using the Pythagorean Theorem when a=14 and b=14. show steps please?
a^2+b^2=c^2,


so if a=14 and b=14, then


14^2+14^2=c^2


196+196=c^2


392=c^2,


take the square root of 392 and you get c=19.799
Reply:a^2 + b^2 = c^2


14^2 + 12^2 = c^2


196 + 196 = c^2


392 = c^2


c = approximately 20


Have you ever gone through a summer without using A/C in your home?

I'm looking to cut expenses, and have been doing so since last October. I haven't turned on the A/C since then, and have been braving it out. Do you think one would be able to make it through the summer without using A/C, or is that just crazy? I have been enjoying the $40 electric bills though, as opposed to $80-$100.

Have you ever gone through a summer without using A/C in your home?
I can't afford an A/C
Reply:Hell, no!!


That's almost impossible!
Reply:OMG! where do you live???


I would LOVE to have a $100 light bill!


my bill is always over $400!


I live in Ga, and yes I use my AC- but we also have a pool that runs 24/7
Reply:You are one brave man... I applaud you... Good luck with summer...
Reply:Here in Florida, its impossible to live without AC. 40 dollars is a really cheap electric bill. I wish i was even paying 100 dollars. My light bill averages in 150-180 dollars a month. I heard if a hurricane did hit in the summer that the Average electric bill would be in the 200's. To me because im use to the heat, if i live in the north, i wouldn`t use it. You should use it though even though its 20-40 dollars more. I hear people dying up north from the heat but in the south, where it is hotter and more humid, you do not .
Reply:I live in New Hampshire in the mountains...even in the middle of summer, it's rare that it ever get hot enough for AC
Reply:Nope...
Reply:Yes, I packed the A/C away and bought a swamp cooler, It works a lot like an a/c except you pour water in it and turn on the unit, it's cheaper and my hydro bill was cut in 1/2
Reply:There is NO way I could live without aircon in the home or in the car - it's needed where I live (tropical Queensland) Australia.


I don't care about the cost.- would rather be comfortable.
Reply:Depends on where you live and your tolerance for being hot.





I spent a whole summer without it a long time ago...I was pregnant and we couldn't afford to buy one. I thought I would die. I live in South Carolina!!!





For Daniel below: People do die each year in the south due to the heat. Every summer it's on the news here in my state about someone who couldn't afford A/C and passed away from heat stroke/exhaustion. I've lived here in SC for over 30 years and I've seen the thermometer as high as 116º. That is too hot for anyone who has no A/C, regardless of where you live!!





A light bill that is less than $200 during the summer in Florida? Consider yourself lucky! Mine ranges from $350-$450 during the summer!!
Reply:i've never used a/c in my life. too poor to pay for that stuff. i live on long island, we get pretty hot and humid summers, if that gives you context of what i deal with. just throw your hair up and wear less clothing. open the windows. and if it's really bad, consider getting a fan..they don't eat electricity like a/c does but they help a lot when it's really terrible outside.
Reply:No chance in hell, too hot here in Australia
Reply:God no, I live in Houston. I would die!
Reply:Honestly there are places that can go on for the whole summer without utilizing the A/C in their home-- but it really depends on the weather and location you're at. I stayed in the bay area and most of the apartments there only come with a heater so during the summer there's no A/C, and we actually get by without complaining. The weather there is great and you can go one for the whole summer w/o the A/C.


However, here in Vegas during the summer you can either: 1) run up your electricity bill trying to use all these fans that will be blowing what feels like hot air 2) end up in the hospital with a heat stroke b/c of the lack of cooling in your home or 3) turn on the A/C and only suffer the bill. In the desert it's a must, day and night.


And no, I can't go on w/o A/C during the summer if I was here in LV.
Reply:When I was a kid we didn't have any A/C... and I will never go through that crap again... ;-)


C. Using a "nature assumption, indicate 3 types of social policy that one might favor to reduce crime.?

Most crimes happen for financial gain. If everyone had enough money to buy their basic necessities, and have all the luxuries they wanted, they'd have no need to commit crimes.

C. Using a "nature assumption, indicate 3 types of social policy that one might favor to reduce crime.?
more support groups


more burglery alarms


more help for mentally ill people


How to connect database to form using asp & c#?

pls can any body tell me , how to connect database to form using asp %26amp; c#

How to connect database to form using asp %26amp; c#?
In ASP.Net you could connect to database in two ways; either declaratively or programmatically.





In declarative method, you could use a SqlDataSource control (a %26lt;asp:SqlDataSource%26gt; tag) to define a connection to the database with a proper ConnectionString, provider and at lease one of the Select, Update, Insert or Delete commands. You could also use a data-bound control such as DropDownList, GridView, or Repeater, … to automatically retrieve data from database or even update the data. In this case, you wouldn’t need to write a single line of programming code in your .cs source file.





In programmatic method, you would use a namespace (System.Data.SqlClient) with a set of classes like SqlConnection and SqlCommand to connect and interact with the data base. Then you would use query commands of SqlCommand object to execute query and non-query transactions on database.





In both case you could use your Web.Config file to define your SQL connection string.





I hope it has been a short useful hint. Good luck.
Reply:The simplest way is to use ADO.Net objects.





That's a subject that's way to complex to explain here.





Go to your local Border's and look through some of the ADO.Net books there. You may even be able to get them from your local library.
Reply:u've to write the following codes within prog.





SqlConnection con = new SqlConnection("Server=...write the server name here...");


SqlCommand com = new SqlCommand();


SqlDataAdapter da = new SqlDataAdapter();


DataSet ds = new DataSet();





Then select a datagrid %26amp; transfer the entire database %26amp; place there, okay ?

hawthorn

C++ Using functions that are declared in other class?

Hi!!!





For example I have this:





//a.cpp


#include a.h


a :: a(){...}


int a :: fun() { int x= 123445564343 return x}





//b.cpp


#include b.h


b :: b(){


... //I want call here fun() declared in "a.cpp" and assign the value returned.


}





How can I do that?


Please give me an example.





Thanks!!!

C++ Using functions that are declared in other class?
You cannot employ member methods from other classes unless the class that wants to use them is a child of the first class.
Reply:For the following I assume that the class a is declared in a.h and b is not derived from a.


1) To access a::fun() b.cpp need its definition so you need "#include a.h" in b.cpp.


2) Make sure that fun() is declared public in a.h.


3) Normally a method of a class accesses its members so it must be called on an instance of that class


Ex:


. int i;


. a test;


. i = test.fun();


For the case you are describing, fun() does not use any of a's members so it could be declared static in a.h and then called directly as "i = a::fun()" without creating an instance of a.





I hope this helps you.
Reply:You can't call varibles of one class to another, unless it is a subclass and in some cases if variables are not declared private. You can't use varibles of one class to another, if so, you have to declare them as public and be sure that they have to be out of any class.


What to expect after I stop using B/C?

I stop using b/c on the last day of my period which was a week ago, know i'm having horrible cramps and redish /brownish discharge is that normal ? Or can it mean pregnancy ? plz help

What to expect after I stop using B/C?
It does not mean you're pregnant. It probably means that your cycle was just thrown off. Wait at least 3 months before you judge your body. If your cycle is not back to normal after 3 months, then go to the doctor. Many women say that their periods become heavier after they get off of b/c, but the discharge probably just means that your body is trying to get back onto cycle.


Vertical lines in C++, using line(); function?

Okay, I know I have to use the line function in graphics in order to create lines. The format for that is (number here, other number here, variable here, another variable here).


If anyone could describe what each value right there means, in the program, it would help immensly.


Here's an example:





setcolor(getmaxcolor());


xmax1 = 322;


ymax1 = 0;





line(322, 1000, xmax1, ymax1);





Any help would be nice. Thanks :D

Vertical lines in C++, using line(); function?
the argument in setcolor(getmaxcolor()); sets the current drawing color to the maximun color in your selected color palete.





the format in line(x1,y1,x2,y2) is as it follows:


You have a rectangular coordinate system in your screen,


the firs two argument are the origin of the line (x1,y1), the next two arguments are the destination (x2,y2), if you put a single point in those coordinates and then join them, you have your line.
Reply:setcolor(getmaxcolor());/* setcolor sets the current drawing color … getmaxcolor returns maximum color value*/





line(322, 1000, xmax1, ymax1); /*draws a line from (x1, y1) to (x2, y2)*/


C) Using supply and demand diagrams, analyse the impact of road pricing for private motorists on:?

(i)THE MARKET FOR PETROL


(ii) THE MARKET FOR BUS JOURNEYS

C) Using supply and demand diagrams, analyse the impact of road pricing for private motorists on:?
Another quality question on Yahoo Answers.


What do you actually want?
Reply:not surprised you haven't got any replies,do your own homework lol

marguerite

Write a programe in c++ using " switch case "?

Create the equivalents of a four-function calculator. The program should request the user to enter a number, an operator, and another number. (Use floating point). It should then carry out the specified arithmetical operation: adding, subtracting, multiplying, or dividing the two numbers. Use switch case statement to select the operation. Finally display the result.


When it finishes the calculation, the program should ask if the user wants to do another calculation. The response can be ‘y’ or ‘n’.


Sample Output


Some sample interaction with the program might look like this:





Enter first number, operator, second number: 10/3


Answer: 3.33333


Do another (y/n)?y


Enter first number, operator, second number: 12+100


Answer: 112


Do another (y/n)?n

Write a programe in c++ using " switch case "?
You aren't seriously suggesting we do your homework are you? I will but it will cost you $100 US and you will fail the exam 'cause you didn't learn anything.





If you want info on the 'switch statement' see below.
Reply:Programmers usually expect to be paid for their services, especially when I (or we) do all the work.


In C# using print dialog box, print contents of richtextBox when user clicks button?

How do I get the PrintPage event to fire when the user clicks a button?


Here's my code:





public delegate void PrintPageEventHandler(Object sender,PrintPageEventArgs e);





PrintDialog myprintdlg = new PrintDialog();


PrintDocument mypdoc = new PrintDocument();





private void button1_Click(object sender, EventArgs e)


{myprintdlg.Document = mypdoc;





if (myprintdlg.ShowDialog() == DialogResult.OK)


mypdoc.Print();}





public event PrintPageEventHandler PrintPage;


private void printDocument1_PrintPage(object sender, PrintPageEventArgs e)


{


string str = richTextBox1.Text;


//formatting omitted to save space


if (str.Length %26gt; chars)


{


str = str.Substring(chars);


e.HasMorePages = true;


}


else


e.HasMorePages = false;

In C# using print dialog box, print contents of richtextBox when user clicks button?
printDocument1.PrintPage += new


System.Drawing.Printing.


PrintPageEventHandler


(this.printDocument1_PrintPage);

tropical flowers

How to program C using Visual C++?

Can you give me the detail on how to start. I just can't see how to start. Do i need to configure something? maybe the path.

How to program C using Visual C++?
Open a cmd window. Go to the path drive:\Program Files\Microsoft Visual Studio\VC98\Bin In the driver where you installed VC. Run VCVARS32.bat file


It will set all the path you need.


Now go to the path where your C program is.


compile using "cl"


Ex: cl filename.c
Reply:in vc++


file-%26gt;new -%26gt; open file tab-%26gt; c source file


then give the file name in the given slot, then press ok


then u will get the new window, then type ur program and execute it, then u will done.
Reply:there no diff in programming c %26amp; VC++ u can use the same browser, select the file type as c header or source file tats it


Can someone build a programme for me using DEV C++?

I want to make a programme using DEV C++ but do not know how to use it. I have thought of what I want the programme to do but do not even know where to start. Please can someone help!

Can someone build a programme for me using DEV C++?
Go to your library and get a book on C/C++ programming. Also before you get out to the library or bookstore check out these online resources. http://www.freeprogrammingresources.com/...


Write in c++, using class to add two distences entered in feet & inches and store the result inthird distance?

pass two distances as argument to a function and the function should return the added distance.use required constructors %26amp; methods in your program.

Write in c++, using class to add two distences entered in feet %26amp; inches and store the result inthird distance?
Too easy.


Enjoy.





- Hex














#include %26lt;iostream%26gt;


#include %26lt;conio.h%26gt; //for getch();








using namespace std;








class MyClass


{


public:


int MyCalculator(int Dis1, int Dis2);


};





int MyClass::MyCalculator(int Dis1, int Dis2)


{


return Dis1 + Dis2;


}





int main()


{


MyClass MC;


cout %26lt;%26lt; MC.MyCalculator(203, 492);





cout %26lt;%26lt; "\nPress any key to close...\n";


getch();


}


Besides hurting gas mileage, does using A/C in a car having any other harmful effects?

In other words, does using the A/C in a car hurt any of the engine, trasnmission, or other components of the car?

Besides hurting gas mileage, does using A/C in a car having any other harmful effects?
Actually the difference between running the a\c and the drag produced by having your windows down or even open slightly is not noticeable on gas consumption. Not running the A\C can cause the seals in the compressor to leak therefore introducing a greenhouse gas to the atmosphere. Might as well use it, and run it every few weeks in the winter for a minute to keep the seals lubricated.
Reply:No other harmful effects. In fact using the a/c keeps the a/c system in top shape because it keeps the internal parts lubricated.
Reply:As with anything, the A/C system will eventually develop a leak. With R134a refrigerant, the ozone layer is not harmed but it's twice as bad as carbon dioxide for global warming. If you already have A/C in your car, might as well use it.
Reply:nope..it will add stress to the engine, but it was designed for it...
Reply:As long as the engine has the horsepower to run the A/C, and modern cars are certainly designed to do so in general, then there's no reason not to enjoy the A/C you paid for when you bought the car, especially before it fails eventually and is not worth repairing after 10 years or so. However, if it wasn't for my wife, I wouldn't need A/C most of the time because I like to roll the windows down and let nature cool me naturally. I never repair the A/C on a 10 year old car unless it only needs minor work.
Reply:The A/C adds some slight additional load to the engine both through the electrical system and the hp necessary to turn the active compressor. That being said, to my knowledge it doesn't hurt anything or shorten the life of any of the components to run the A/C, except maybe the switches from turning it on and off ;).
Reply:No, and it doesn't hurt your gas mileage much at all. Not running it at all actually good be worse cause the compressor could freeze up and lock down and burn the belts off. So I would run it at least every so often to make sure its charged and running smoothly.

sound cards

Write in c++, using class to add two distences entered in feet & inches and store the result inthird distance?

pass two distances as argument to a function and the function should return the added distance.use required constructors %26amp; methods in your program.(answer should be with full program)

Write in c++, using class to add two distences entered in feet %26amp; inches and store the result inthird distance?
Discussion boards can not supplant the basic necessity of homework. They can only complement the efforts that are initiated from one's own self.





I would suggest you read the following tips on best utilizing discussion boards:





http://www.codeproject.com/scrapbook/for...


http://www.dotnetspider.com/kb/Article17...
Reply:If you know Classes and Objects in C++ and Functions as well , you can write this program.
Reply:Why are you asking for full program? Is this a quesion in your assignment in your school?
Reply:Uhhhh..... do you want someone to write the whole thing for you? In the words of George Bush (senior - I'm old) :





"Read my lips -- not gonna' do it!"





Now, if you get a little code down, and want some help, you can post it, and I will be glad to check it out.


Copy and paste not working even by using ctrl c and ctrl v what do i do now?

I have used cpoy and paste by right clicking forever but now it doesnt work not even by using ctrl c and ctrl v any suggestions on what to look for now

Copy and paste not working even by using ctrl c and ctrl v what do i do now?
Highlight the text, then click on "Edit" from your menu on the top of the screen and select "Copy".





If that doesn't work, I really don't know what else you can do.
Reply:Sounds like you're using a Windows-based computer.





Which application are you trying to copy and paste from?





If you're trying to copy from a website, know that some websites are set up to purposefully block copy and pasting of content. In these cases, you can often still get a screen shot by using ALT+PrtScn to capture an image of the screen, then pasting the image into Microsoft Paint.





Not all applications support copy and paste functions.





Some apps support CTRL+Insert for Copy, SHIFT+Insert for Paste.





And, as a last resort, you can also try rebooting the computer, this often solves weird problems.