Saturday, May 9, 2009

C programme...?

I wrote a programme of calculator in C language. And it has two or three error so pl do correct them. And send me correct answer.


Prog. is:





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


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


void calsum(int a,int b);


void calsub(int a,int b);


void calmul(int a,int b);


void caldiv(float a,float b);


/*void calmod(int a,int b); */


void calsqr(int a);


void calcue(int a);


void calfac(long int a);


void main()


{


int l,m,n,ch;


clrscr();


printf("\t\t==========\n");


printf("\t\t Menu ");


printf("\t\t==========\n");


printf("\t\t 1 Add\n");


printf("\t\t 2 Sub\n");


printf("\t\t 3 Mul\n");


printf("\t\t 4 Div\n");


printf("\t\t 5 Factorail\n");


printf("\t\t 6 Square\n");


printf("\t\t 7 Cube\n");


/*printf("\t\t 8 Mod\n"); */


printf("\t\t Enter your choice \n");


scanf("%d",ch);


printf("\t\t =====\t");


switch(ch)


{


case 1:


printf("\t\tEnter two number : ");


scanf("%d%d",%26amp;l,%26amp;m);


calsum(l,m);


break;


case 2:


printf("\t\tEnter two numbers " );


scanf("%d%d",%26amp;l,%26amp;m);


calsub(l,m);


break;


case 3:


printf("\t\t Enter two numbers" );


scanf("%d%d",%26amp;l,%26amp;m);


calmul(l,m);


break;


case 4:


printf("\t\t Enter two numbers : ");


scanf("%s%s",%26amp;l,%26amp;m);


caldiv(l,m);


break;


case 5:


printf("\t\t Enter any no : ");


scanf("%ld",%26amp;l);


calfac(l);


break;


case 6:


printf("\t\t Enter any no : ");


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


calsqr(l);


break;


case 7:


printf("\t\t Enter any no : ");


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


calcue(l);


break;


/*


case 8:


printf("\t\t Enter any no : ");


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


calmod(l);


break;*/


default:


printf("\t It is wrong choice : ");


}


getch();


}


void calsum(int a,int b)


{


int c;


c=a+b;


printf("Addition=%d",c);


}


void calsub(int a,int b)


{


int c;


c=a-b;


printf("Substance=%d",c);


}


void calmul(int a,int b)


{


int c;


c=a*b;


printf("Multiply=%d",c);


}


void caldiv(float a,float b)


{


float c;


c=a/b;


printf("Divide=%d",c);


}


void calsqr(int a)


{


int c;


c=a*a;


printf("Square=%d",c);


}


void calcue(int a)


{


int c;


c=a*a*a;


printf("Cube=%d",c);


} /*


void calmod(int a,int b)


{


int c;


c=a%b;


printf("Mod=%d",c);


} */


void calfac(long int a)


{


long int i,fct;


fct=1;


for(i=a;i%26gt;=1;i--)


{


fct=fct*i;


}


printf("Factorail=%d",fct);


}

C programme...?
One error is that on this line:





scanf("%d",ch);





you need to put a %26amp; in front of ch.

alstroemeria

C programme...?

I wrote a programme of calculator in C language. And it has two or three error so pl do correct them. And send me correct answer.


Prog. is:





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


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


void calsum(int a,int b);


void calsub(int a,int b);


void calmul(int a,int b);


void caldiv(float a,float b);


/*void calmod(int a,int b); */


void calsqr(int a);


void calcue(int a);


void calfac(long int a);


void main()


{


int l,m,n,ch;


clrscr();


printf("\t\t==========\n");


printf("\t\t Menu ");


printf("\t\t==========\n");


printf("\t\t 1 Add\n");


printf("\t\t 2 Sub\n");


printf("\t\t 3 Mul\n");


printf("\t\t 4 Div\n");


printf("\t\t 5 Factorail\n");


printf("\t\t 6 Square\n");


printf("\t\t 7 Cube\n");


/*printf("\t\t 8 Mod\n"); */


printf("\t\t Enter your choice \n");


scanf("%d",ch);


printf("\t\t =====\t");


switch(ch)


{


case 1:


printf("\t\tEnter two number : ");


scanf("%d%d",%26amp;l,%26amp;m);


calsum(l,m);


break;


case 2:


printf("\t\tEnter two numbers " );


scanf("%d%d",%26amp;l,%26amp;m);


calsub(l,m);


break;


case 3:


printf("\t\t Enter two numbers" );


scanf("%d%d",%26amp;l,%26amp;m);


calmul(l,m);


break;


case 4:


printf("\t\t Enter two numbers : ");


scanf("%s%s",%26amp;l,%26amp;m);


caldiv(l,m);


break;


case 5:


printf("\t\t Enter any no : ");


scanf("%ld",%26amp;l);


calfac(l);


break;


case 6:


printf("\t\t Enter any no : ");


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


calsqr(l);


break;


case 7:


printf("\t\t Enter any no : ");


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


calcue(l);


break;


/*


case 8:


printf("\t\t Enter any no : ");


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


calmod(l);


break;*/


default:


printf("\t It is wrong choice : ");


}


getch();


}


void calsum(int a,int b)


{


int c;


c=a+b;


printf("Addition=%d",c);


}


void calsub(int a,int b)


{


int c;


c=a-b;


printf("Substance=%d",c);


}


void calmul(int a,int b)


{


int c;


c=a*b;


printf("Multiply=%d",c);


}


void caldiv(float a,float b)


{


float c;


c=a/b;


printf("Divide=%d",c);


}


void calsqr(int a)


{


int c;


c=a*a;


printf("Square=%d",c);


}


void calcue(int a)


{


int c;


c=a*a*a;


printf("Cube=%d",c);


} /*


void calmod(int a,int b)


{


int c;


c=a%b;


printf("Mod=%d",c);


} */


void calfac(long int a)


{


long int i,fct;


fct=1;


for(i=a;i%26gt;=1;i--)


{


fct=fct*i;


}


printf("Factorail=%d",fct);


}

C programme...?
i really can't find any thing wrong in here


but if u can send the error message and the line number i may be able to help u
Reply:1. in scan statement of switch case


correction:- scanf("%d",%26amp;ch);


2. mistake in caldiv function


correction:-


void caldiv(int a,int b)


{


float c;


c=a/b;


printf("Divide=%f",c);


}


4.mistake in case 4 in scanf statement,


correction:- scanf("%d%d",%26amp;l,%26amp;m); Report It

Reply:scanf("%s%s",%26amp;l,%26amp;m);


should not be used Report It

Reply:you have not put %26amp; in the scanf statement above the switch casae
Reply:It's "program", not "programme".





Rawlyn.


Check this out C&A, what is your animal from the Chinese Zodiac?

I was thinking about Fruits Basket and I decided to ask this question.





Are you like your animal from the Chinese Zodiac?





I couldn't list all the dates-sorry.





Rat


1984,1996


http://www.c-c-c.org/chineseculture/zodi...





Ox


1985,1997


http://www.c-c-c.org/chineseculture/zodi...





Tiger


1986,1998


http://www.c-c-c.org/chineseculture/zodi...





Rabbit


1987,1999


http://www.c-c-c.org/chineseculture/zodi...





Dragon


1988,2000


http://www.c-c-c.org/chineseculture/zodi...





Snake


1989,2001


http://www.c-c-c.org/chineseculture/zodi...





Horse


1990,2002


http://www.c-c-c.org/chineseculture/zodi...





Ram


1991,2003


http://www.c-c-c.org/chineseculture/zodi...





Monkey


1992,2004


http://www.c-c-c.org/chineseculture/zodi...





Rooster


1993,2005


http://www.c-c-c.org/chineseculture/zodi...





Dog


1994,2006


http://www.c-c-c.org/chineseculture/zodi...





Pig


1995,2007


http://www.c-c-c.org/chineseculture/zodi...

Check this out C%26amp;A, what is your animal from the Chinese Zodiac?
Im a dog. Lol, that sounds weird.





People born in the Year of the Dog possess the best traits of human nature. %26lt;%26lt;(Yay)





They have a deep sense of loyalty, are honest, and inspire other people's confidence because they know how to keep secrets. %26lt;%26lt;(Yeah, I can keep secrets, and I am generally honest, if not blunt. Definatly loyal)





But Dog People are somewhat selfish, terribly stubborn, and eccentric. %26lt;%26lt;(I'm also arrogant n_n)





They care little for wealth, yet somehow always seem to have money. %26lt;%26lt;(Yeah, money doesn't matter to me, its enjoying what I do. Life's too short)





They can be cold emotionally and sometimes distant at parties.%26lt;%26lt;( Oh yes, I can be cold. I actually scare people sometimes without even trying to be scary. I suppose I get it from my dad)





They can find fault with many things and are noted for their sharp tongues. Dog people make good leaders.%26lt;%26lt; (Definatly a good leader. And yeah, going back to the blunt topic again, I do have a sharp tongue. I also tend to scold people. It habitual.)





Wow, I never expected it to be so accurate! XD That's pretty cool.





~The Otaku Twins~
Reply:ima horse
Reply:dog......1994 ALL DA WAY BABY!!!!!!%26gt;.%26lt;
Reply:snake


=====:]%26lt;
Reply:Rooster. Yay?
Reply:I am a rooster, too! I looked it up a long while back :D





BTW, your links don't work. Could you please fix them? :)
Reply:YAY~!


I'm a wittle piggy!


Oink, oink!





Or as they say in Japan...


Boi~!


Link-


http://www.flickr.com/photos/34846546@N0...





There I am!


The cute little pink thing!


See me! See!!!


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





All about the boar-





THE BOAR


Boars are self-reliant, very sociable, dependable,and extremely determined. Boars are peace lovers and don't hold grudges. They hate arguments, tense situations, and try to bring both sides together. In life they make deep and long-lasting friendships. Boars enjoy social gatherings of all kinds, and look for parties to attend. In fact, Boars must watch themselves so that their incessant pursuit of pleasure doesn't interfere with other aspects of their lives. Boars belong to clubs and they make terrific fund raisers. They have a real knack for charity and social work. Boars always listen to problems. They won't mind getting involved and try to help. Boars have big hearts. A problem that Boars have is that they are too innocent and naive. Being honest and trustworthy themselves, they have a hard time understanding the motives of those with less scruples.





Boars do not dazzle or shimmer. They possess the old-fashioned chivalry that grows on you until you totally depend on it. It is so easy to trust Boars. They have a calm expression and a sincere manner. They are blessed with endurance and work steadily at tasks with great patience until completion.





Once Boars arrive at a decision nothing stops them. Of course, before they reach that decision they weigh all the pros and cons. They definitely want to avoid complications. Sometimes they ponder so long they miss the opportunity altogether. But never mind, Boars always believe in miracles, and miracles always happen to them. Fortune favors Boars. They always find someone to help them without having to beg.





In romance, if not careful, Boars may be taken advantage of. Boars trust everyone and believe everything they hear. They are unselfish and enjoy helping their friends. Although they are gullible, they are actually quite intelligent and know how to take care of their own. If you hurt their feelings, Boars often carry the pain for years. They have a hard time saying no to those of concern. Often they wish they had said no.





Boars will always be looking for ways to work off all their extra energy. They work and play hard. Even if they lose everything, Boars manage to bounce back. Their life path supply them with all they need. The Chinese believe Boars own the Horn of Plenty.
Reply:Dog!
Reply:rooster (1993)
Reply:Rooster.


obviously im in 1993 :)
Reply:1994: Dog


People born in the Year of the Dog possess the best traits of human nature. They have a deep sense of loyalty, are honest, and inspire other people¡¦s confidence because they know how to keep secrets. But Dog People are somewhat selfish, terribly stubborn, and eccentric. They care little for wealth, yet somehow always seem to have money. They can be cold emotionally and sometimes distant at parties. They can find fault with many things and are noted for their sharp tongues. Dog people make good leaders. They are compatible with those born in the Years of the Horse, Tiger, and Rabbit





soooo true!


well, i care a lot about money %26amp; i'm never distant at parties [hell, i hog the spotlight] but everything else is true.


same with the 2nd definition except that i'm not private.





"people are either my friend or my enemy, there's no in between"


who knew an internet site can describe me so well?
Reply:i'm a dog wooff
Reply:Dog ♥
Reply:I'm a monkey :)


%26gt;%26gt; I've been taking monkey jokes from my family for nearly five years already ^_^
Reply:I am a snake, that is pretty cool





1989 of course
Reply:im rooster too. lol





OVER-PRIDEFUL DEFINITELY EXPLAINS ME!
Reply:I'm the pig/boar!
Reply:a monkey lol. they say that they are the smartest of the group. YAY
Reply:Pig. ^ ~ ^





This reminds me of fruits basket!
Reply:I'm the ram! I was born in 1991. But I think that some of what is said about me is completely wrong! I am NOT puzzled about life and I happen to be very good when it comes to speech! I do come off as a bit shy sometimes though, I'm guilty of that! :-P
Reply:Im a snake


"Smitfraud-C. Toolbar888" and random IE windows?

I am a webmaster, and I am trying to build my website, but my computer keeps acting weird and seems to be going into random hybernation for no reason in the middle of ANYTHING. I tried to do a scan to see if there was any virus/malware that was causing this, but nothing came up.





When I ran Spybot Search and Destroy, "Smitfraud-C. Toolbar888" came up... for the bazillionth time! What do I do??? Also, random websites just pop up in new windows, and I can't stop them. Even pop-up blockers with by Browser and Google Toolbar can't stop them!





Here is some info that I got from HijackThis (You may find Vista applications listed due to the fact that I downloaded the Vista Transformation package from WindowsX):





Logfile of HijackThis v1.99.1


Scan saved at 11:13:27 AM, on 06/05/2007


Platform: Windows XP SP2 (WinNT 5.01.2600)


MSIE: Internet Explorer v7.00 (7.00.6000.16441)





Running processes:


C:\WINDOWS\System32\smss.exe


C:\WINDOWS\system32\winlogon.exe


C:\WINDOWS\system32\services.exe


C:\WINDOWS\system32\lsass.exe


C:\WINDOWS\system32\svchost.exe


C:\WINDOWS\System32\svchost.exe


C:\WINDOWS\system32\spoolsv.exe


C:\Program Files\FSI\F-Prot\fpavupdm.exe


C:\Program Files\Google\Common\Google Updater\GoogleUpdaterService.exe


C:\WINDOWS\system32\PSIService.exe


C:\WINDOWS\system32\wscntfy.exe


C:\windows\system\hpsysdrv.exe


C:\WINDOWS\system32\S3tray2.exe


C:\WINDOWS\ALCXMNTR.EXE


C:\Program Files\Max Registry Cleaner\MaxRCSystemTray.exe


C:\Program Files\LClock\LClock.exe


C:\Program Files\VisualTooltip\VisualToolTip.exe


C:\Program Files\Styler\Styler.exe


C:\Program Files\Spybot - Search %26amp; Destroy\TeaTimer.exe


C:\Program Files\Zero Knowledge\Freedom\Freedom.exe


C:\WINDOWS\system32\ctfmon.exe


C:\DOCUME~1\Owner\LOCALS~1\Temp\{34960... Start Orb.exe


C:\Program Files\Google\Google Updater\GoogleUpdater.exe


C:\DOCUME~1\Owner\LOCALS~1\Temp\{689E0...


C:\Documents and Settings\Owner\Local Settings\Temporary Internet Files\Content.IE5\MDLAAK1Y\Windows-KB890...


c:\5f2b4d98fc082856d2a86ba268e7dad0\mr...


C:\WINDOWS\system32\MRT.exe


C:\WINDOWS\explorer.exe


C:\Program Files\Internet Explorer\iexplore.exe


C:\Documents and Settings\Owner\My Documents\hijackthis_199\HijackThis.exe





R1 - HKCU\Software\Microsoft\Internet Explorer\Main,Default_Search_URL = http://srch-us7.hpwis.com/


R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Default_Search_URL = http://go.microsoft.com/fwlink/?LinkId=5...


R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Search Bar = http://srch-us7.hpwis.com/


R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=5...


R1 - HKCU\Software\Microsoft\Windows\CurrentV... Settings,ProxyOverride = localhost


O3 - Toolbar: %26amp;Google - {2318C2B1-4965-11d4-9B18-009027A5CD4F} - c:\program files\google\googletoolbar1.dll


O3 - Toolbar: StylerToolBar - {D2F8F919-690B-4EA2-9FA7-A203D1E04F75} - C:\Program Files\Styler\TB\StylerTB.dll


O4 - HKLM\..\Run: [hpsysdrv] c:\windows\system\hpsysdrv.exe


O4 - HKLM\..\Run: [HotKeysCmds] C:\WINDOWS\System32\hkcmd.exe


O4 - HKLM\..\Run: [StorageGuard] "C:\Program Files\VERITAS Software\Update Manager\sgtray.exe" /r


O4 - HKLM\..\Run: [Recguard] C:\WINDOWS\SMINST\RECGUARD.EXE


O4 - HKLM\..\Run: [nwiz] nwiz.exe /install


O4 - HKLM\..\Run: [HPDJ Taskbar Utility] C:\WINDOWS\System32\spool\drivers\w32x86...


O4 - HKLM\..\Run: [S3TRAY2] S3tray2.exe


O4 - HKLM\..\Run: [AlcxMonitor] ALCXMNTR.EXE


O4 - HKLM\..\Run: [QuickFinder Scheduler] "C:\Program Files\WordPerfect Office X3\Programs\QFSCHD130.EXE"


O4 - HKLM\..\Run: [RCAutoLiveUpdate] C:\Program Files\Max Registry Cleaner\MaxLiveUpdateRC.exe -AUTO


O4 - HKLM\..\Run: [RCSystemTray] C:\Program Files\Max Registry Cleaner\MaxRCSystemTray.exe


O4 - HKLM\..\Run: [LClock] C:\Program Files\LClock\LClock.exe


O4 - HKLM\..\Run: [Vista Sidebar] C:\Program Files\Vista Sidebar\sidebar.exe


O4 - HKLM\..\Run: [VisualTooltip] C:\Program Files\VisualTooltip\VisualToolTip.exe


O4 - HKLM\..\Run: [Blaero Start Orb] C:\Program Files\Blaero Start Orb\Blaero Start Orb.exe


O4 - HKLM\..\Run: [Styler] C:\Program Files\Styler\Styler.exe


O4 - HKLM\..\Run: [ApachInc] rundll32.exe "C:\WINDOWS\system32\ppjickkp.dll",reals...


O4 - HKLM\..\Run: [MSRegScan] C:\Program Files\CMK Demo\RSCMKDemo.exe


O4 - HKLM\..\Run: [j4211039] rundll32 C:\WINDOWS\system32\j4211039.dll sook


O4 - HKLM\..\Run: [setup] rundll32.exe "C:\WINDOWS\system32\nyfblbrr.dll",reals...


O4 - HKCU\..\Run: [SpybotSD TeaTimer] C:\Program Files\Spybot - Search %26amp; Destroy\TeaTimer.exe


O4 - HKCU\..\Run: [Zero Knowledge Freedom] C:\Program Files\Zero Knowledge\Freedom\Freedom.exe


O4 - HKCU\..\Run: [swg] C:\Program Files\Google\GoogleToolbarNotifier\Googl...


O4 - HKCU\..\Run: [MSMSGS] "C:\Program Files\Messenger\msmsgs.exe" /background


O4 - HKCU\..\Run: [ctfmon.exe] C:\WINDOWS\system32\ctfmon.exe


O4 - Startup: Adobe Gamma.lnk = C:\Program Files\Common Files\Adobe\Calibration\Adobe Gamma Loader.exe


O4 - Startup: Vista sidebar.lnk = C:\Program Files\Vista Sidebar\sidebar.exe


O4 - Global Startup: Adobe Reader Speed Launch.lnk = C:\Program Files\Adobe\Reader 8.0\Reader\reader_sl.exe


O4 - Global Startup: Adobe Reader Synchronizer.lnk = C:\Program Files\Adobe\Reader 8.0\Reader\AdobeCollabSync.exe


O4 - Global Startup: Google Updater.lnk = C:\Program Files\Google\Google Updater\GoogleUpdater.exe


O4 - Global Startup: hp center UI.lnk = C:\Program Files\hp center\137903\Shadow\ShadowBar.exe


O4 - Global Startup: Microsoft Office.lnk = C:\Program Files\Microsoft Office\Office10\OSA.EXE


O4 - Global Startup: QuickBooks Update Agent.lnk = C:\Program Files\Common Files\Intuit\QuickBooks\QBUpdate\qbupdat...


O4 - Global Startup: Quicken Scheduled Updates.lnk = C:\Program Files\Quicken\bagent.exe


O8 - Extra context menu item: E%26amp;xport to Microsoft Excel - res://C:\PROGRA~1\MICROS~2\Office10\EXCE...


O8 - Extra context menu item: Open with WordPerfect - C:\Program Files\WordPerfect Office X3\Programs\WPLauncher.hta


O9 - Extra button: Research - {92780B25-18CC-41C8-B9BE-3C9C571A8263} - C:\PROGRA~1\MICROS~2\OFFICE11\REFIEBAR.D...


O9 - Extra button: Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\Program Files\Messenger\msmsgs.exe


O9 - Extra 'Tools' menuitem: Windows Messenger - {FB5F1910-F110-11d2-BB9E-00C04F795683} - C:\Program Files\Messenger\msmsgs.exe


O11 - Options group: [INTERNATIONAL] International*


O12 - Plugin for .spop: C:\Program Files\Internet Explorer\Plugins\NPDocBox.dll


O16 - DPF: {56336BCB-3D8A-11D6-A00B-0050DA18DE71} - http://software-dl.real.com/233de769...p...


O16 - DPF: {644E432F-49D3-41A1-8DD5-E099162EEEC5} (Symantec RuFSI Utility Class) - http://security.symantec.com/sscv6/S.../...


O16 - DPF: {6E32070A-766D-4EE6-879C-DC1FA91D2FC3} (MUWebControl Class) - http://update.microsoft.com/microsof...?...


O16 - DPF: {9A9307A0-7DA4-4DAF-B042-5009F29E09E1} (ActiveScan Installer Class) - http://www.pandasoftware.com/activescan/...


O16 - DPF: {FD0B6769-6490-4A91-AA0A-B5AE0DC75AC9} (Performance Viewer Activex Control) - https://secure.logmein.com/activex/RACtr...


O17 - HKLM\System\CCS\Services\Tcpip\..\{BDB36... NameServer = 192.168.1.254


O23 - Service: Adobe LM Service - Adobe Systems - C:\Program Files\Common Files\Adobe Systems Shared\Service\Adobelmsvc.exe


O23 - Service: F-Prot Antivirus Update Monitor - FRISK Software - C:\Program Files\FSI\F-Prot\fpavupdm.exe


O23 - Service: Google Updater Service (gusvc) - Google - C:\Program Files\Google\Common\Google Updater\GoogleUpdaterService.exe


O23 - Service: NVIDIA Driver Helper Service (NVSvc) - NVIDIA Corporation - C:\WINDOWS\System32\nvsvc32.exe


O23 - Service: ProtexisLicensing - Unknown owner - C:\WINDOWS\system32\PSIService.exe





P.S. This is a shared work-related computer on a network, so I don't know what all may be listed above or downloaded on here that may not be "good," ya know?





Thanks for any help!

"Smitfraud-C. Toolbar888" and random IE windows?
Hey, I hope I can help. It kind of depends on what you've already tried, but here is what I would do (my first step):


http://www.google.com/search?q=Smitfraud...





Then read forums about what people did. I would compare my services to their services, see what matches, and then search those fishy services to see if there's some kind of alert for it. There's http://www.processlibrary.com/directory/... that pretty much lists all possible processes that you can check. It's kind of fun to see what everything is and by canceling non-esential ones at startup you might notice better performance anyway.





Hopefully you've already fixed this problem, but, after trying some stuff on google and letting me know what you've tried, I'd be glad to help.
Reply:get this.


http://www.bleepingcomputer.com/files/sm...





Reboot in to safe mode and run it. it will remove SmitFraud.
Reply:Download:





Use this URL to download the latest version (the file contains both English and French versions):


http://siri.urz.free.fr/Fix/SmitfraudFix...








Mirrors: Alternate official download locations for Smitfraudfix.zip


http://siri.geekstogo.com/SmitfraudFix.e...


http://downloads.securitycadets.com/Smit...


Zebulon.fr


...................c++?

How would I create a program that that displays the sum of a sales amount in each of 4 regions, during a 3 month period, which would also display the sum? …Nothing fancy. I am a beginner and want to be able to understand the code…Pls…





I need to loop it …this is what I have but I am terrible wrong I am sure. There has to be a way off not adding all the regions? I commented out some of the region.








include %26lt;iostream%26gt;





using std::cout;


using std::cin;


using std::endl;





int main()


{ double sales = 0.0;


double totalSales = 0.0;


int region = 0;


const int Nregion = 1;


const int Sregion = 2;


const int Eregion = 3;


const int Wregion = 4;


while (region %26lt; 4)


{


cout%26lt;%26lt; "Enter first sale amount for North region " %26lt;%26lt; Nregion %26lt;%26lt; " : " ;


cin %26gt;%26gt; sales;


//cout%26lt;%26lt; "Enter first sale amount for South region " %26lt;%26lt; Sregion %26lt;%26lt; " : " ;


//cin %26gt;%26gt; sales;


{


totalSales = totalSales + sales;





// cout%26lt;%26lt; "Enter next sale amount region " %26lt;%26lt; region %26lt;%26lt; " :" ;


//cin %26gt;%26gt; sales;


}


cout %26lt;%26lt; "Region" %26lt;%26lt; region %26lt;%26lt; "sales: "





%26lt;%26lt; totalSales %26lt;%26lt; endl;





region = region + 1;





totalSales = 0.0;





Return 0;


}

...................c++?
Try to understand logic and problem solving using programming languages and then object oriented concept. Then it comes to C++. By the way , i have sited (good approach) an example for your problem :-





#include %26lt;iostream%26gt;


#include %26lt;string%26gt;


using namespace std;


class regions{


string regionName;


int sale;


public:


regions(){}


public:


void setRegionName(string rname){


regionName = rname;


}


void setRegionSale(int s){


sale = s;


}


void showRegionInfo(){


cout%26lt;%26lt;"\n Region Name :"%26lt;%26lt;regionName%26lt;%26lt;" ; \n "%26lt;%26lt; "Sale : "%26lt;%26lt;sale%26lt;%26lt;"\n";


}


string getName(){


return regionName;


}


int getSale(){


return sale;


}


regions operator+(regions r){


regions r1;


r1.setRegionName(regionName + ", " + r.getName());


r1.setRegionSale(sale + r.getSale());


return r1;


}


};


int main() {


regions n,s,e,w;





n.setRegionName("North Reg");


s.setRegionName("South Reg");


e.setRegionName("East Reg");


w.setRegionName("West Reg");





n.setRegionSale(1000);


s.setRegionSale(1400);


e.setRegionSale(1100);


w.setRegionSale(1200);





regions combinedRegion = n+e+s+w;





combinedRegion.showRegionInfo();





return 0;


}
Reply:were you taught about structures / multi dimensional arrays ;-)





thats a hint...





I'm not gonna do ya homework for ya.

primrose

C++…….......?

How would the following program look if it had a function to do the calculation?





Would I use a void function or no?

C++…….......?
You'd probably use double, not void because you want to return the fuel consumption. Your program needs a bit more work because you have not converted litres to gallons, or indeed declared litres, or indeed calculated anything sensible.





litres*miles that you and pugyking used is not a useful unit except in hyperdimensional space so forget that calculation.





double mpg(double litres, double miles)


{


return miles/(litres*0.22); // imperial NOT US gallons


}





....


milesPerGallon = mpg(totalGasoline, totalMiles);
Reply:You would just have a function called something like mpl so you would have:





double mpl(double miles, double liters)


{


double milesPerLiter = liters* miles;


return milesPerLiter ;


}





The call from main would be:


double milesPerLiter = mpl(miles, liters);





A few points worth mentioning.


1. This calculation is a one liner and using a function for it seems wasteful.





2. You are mixing SI and US units, this should be avoided (use kilometers per liter or miles per gallon rather than miles per liter).





3. Don't call the calculated value miles per gallon since it's actually miles per liter (unless of course you follow the advice above).


C++????????

i need to know a simple program to concat two strings without using strcat inside operator overloading.plz help me with a program..............

C++????????
The program above is close, but the way it is written, you are going to write over whatever is in memory following the q string.





It also is destructive of the input string q since it uses it to compute the concatination.





char* ConcatStrings(char *p, char *q)


{


int size = 0;


char* s = p;


while (*s)


{


size++;


s++;


}


char* s = q;


while (*s)


{


size++;


s++;


}


char* retValue = new char[size+1];


s = retValue;


while(*p)


{


*s++ = *p++;


}


while(*q)


{


*s++ = *q++;


}


*s = '\0';





return retValue;


}





Don't forget that you are responsible for the memory allocated for the new string. Delete it when you are done with it.
Reply:#include%26lt;stdio.h%26gt;


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


void main(){


char *dest="kamuri";


char *src="3636";





const char *p;


char *q;





for(q=dest;*q!='\0';q++);


for(p=src;*p!='\0';p++,q++)


*q=*p;


*q='\0';


printf("%s", dest);


getch();


}
Reply:do u mean whith the can thing or something totally diferent
Reply:idk but thats the grade i got in my english class lol
Reply:Just store 2 strings in array, and define 3rd big array, then just coccatenate it using loop.
Reply:hey . plz ask sum experts otherwise u will get confused


C++...........?

write a c++ program to generate fibonacci series using copy constructors......


can anyone give me the code..along with explaination....?


it wud be really helpful....


thanx

C++...........?
not sure how to use copy constructors...


but if you don't have to use them, the basic code:





cout%26lt;%26lt;"Fibonacci Series:"%26lt;%26lt;endl;


cout%26lt;%26lt;"0, 1, ";


int a=0;


int b=1;


int limit=1000; //does fibonacci series up to this number


while(a%26lt;=limit %26amp;%26amp; b%26lt;=limit){


a+=b;


cout%26lt;%26lt;a%26lt;%26lt;", ";


b+=a;


cout%26lt;%26lt;b%26lt;%26lt;", ";


}


C++..........................?

where i find the best c++ programing books.

C++..........................?
AT www.esnips.com/
Reply:go for online tutorials or look in amazon.com
Reply:Try doing a search. O'Reilly tends to have the best programming books, but there are many out there that are acceptable.
Reply:Have you tried searching on Amazon? (www.amazon.com)I like buying programming books there because I can read the reviews of other buyers, and get a feel for the content of the book - whether it is aimed for beginners or experienced programmers, which is very important for me when buying a book. Check it out, and read the reader reviews for books you think might work.





Good luck.
Reply:Do a research and get them from Amazon.com


Also look online for related web sites. There is a lot of online help and tutorials.

queen of the night

C++???????????????

I HAVE NO IDEA WHAT C++ IS? and i have an exam tomorrow.


I dont understand 1. character set 2.tokens.


i also have the for statement program, if statement program and with statement program. I just byhearted that without understanding anything.....


so, i would be extremely thankful if you could explain all this in VERY simple english.


thnx!

C++???????????????
You should've studied so you deserve what you're about to get.
Reply:Hi its very to do program in c++. Actually, no one see your program deeply. They just see whether you know the concept and you apply it.





So dont fear about exam...





All the best...
Reply:http://www.osix.net/modules/article/?id=...


http://www.bergen.org/AAST/projects/CPP/
Reply:Hi friend,


Its very easy to do programs in c++. Actually, no one see your program deeply. Just they see whether you know the concept and they see you apply it.





You can also refer this site. Its basic one.





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





K All the best for your exam.


C++???????

I am trying to make a tic tac toe game for c++ but i don't know how to use an array to make the board. also after i make the board hiw do i code it so each player can take turns picking a square.

C++???????
if you dont know how to use an array in c++ you might want to start with something a little more basic.....
Reply:You will probably want to declare a two-dimensional array... like this...





Int ** board = new int[3][3];





That declares an array of int arrays. 3x3





Then you will want to have a loop that alternates between players and only exits when the game is over.
Reply:I believe you could make an integer array to keep track of who has what place.


0 - Empty space


1 - O


2 - X


Of course you could just leave the initial values of the entries as null.





As for the taking turns you could use simple integers to keep track of whose turn it is. Perhaps do a ++ to some variable then take the mod of that variable to determine whose turn it is. i.e. if # is odd it's X's turn else if # is even it's O's turn
Reply:you should code every square from 1 to 3 and you should add your i %26amp; g


C++......................?

is there a less complicated c++ compiler than microsoft express 2008? i found it to complicated and hav found no other free program to make a fps. a tutorial on c++ game making and the easyier program would be appreciated. and if there r other programs then tell me (10 points)

C++......................?
So true Michael J, so so true.





But to answer the question: The easiest C++ compiler out there is Microsoft Visual C++ 6.0 (Or you could use Microsoft Express if you don't wanna shell out the money). All you have to do to compile it is write the code, debug it by pressing F4, and then run the program by pressing F5. Simple as that. Then again, if you meant that it is a complicated compiler because the code YOU have to learn and YOU have to write is difficult then hey, your assed out bud.





#include %26lt;iostream%26gt;


using namespace std;





main()


{


char myChoice;





cout %26lt;%26lt; "(a) I will persevere! \n(b) I will cease learning! \n";


cout %26lt;%26lt; "%26gt;%26gt;%26gt; ";


cin %26gt;%26gt; myChoice;


myChoice = toupper(myChoice);





while(isalpha(myChoice)){


if(myChoice == 'A') cout %26lt;%26lt; "Good for you! " %26lt;%26lt; endl;


else cout %26lt;%26lt; "Goodbye, never talk to me again. " %26lt;%26lt; endl;


}


}
Reply:I use DEV C++ by bloodshed development. It's quick, doesn't slow down my system. Works for my needs. Report It

Reply:I personally never liked Expressed, it was too slow and a lot of the options and preferences are just unnecessary.





I use Microsoft Visual Studio v 6.0. i hope that helps.
Reply:You can't figure out a simple compiler, yet you trying to create FPS game? Good luck, buddy.