Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,057 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,573 people online right now. Registration is fast and FREE... Join Now!




make me a C program.

3 Pages V  1 2 3 >  
Closed TopicStart new topic

make me a C program., plz help me!!!

rbjaps
19 Jul, 2008 - 06:31 AM
Post #1

New D.I.C Head
*

Joined: 19 Jul, 2008
Posts: 6

a C program that solves the roots of a quadratic equation:

1.prompt the userto enter the correct program password(password= essu).
2.the user will be given three attempts to supply the correct password,if in the third attempt and the password is still incorrect the program terminate its execution.
3.prompt the user to enter values for the coefficient A, B, C using the terminal keyboard.
4.compute the discriminant of the quadratic equation using the formula d=B^2-4AC.
5.determine if the roots of the equation are real bny computing the discriminant to zero; if the discriminant is less than 0,roots are complex:if discriminant is greater than 0 or equal to 0,the roots are real.
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: Make Me A C Program.
19 Jul, 2008 - 06:40 AM
Post #2

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,522



Thanked: 96 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
We won't do your homework for you.

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
User is offlineProfile CardPM
+Quote Post

Cerolobo
RE: Make Me A C Program.
19 Jul, 2008 - 07:06 AM
Post #3

D.I.C Regular
Group Icon

Joined: 5 Apr, 2008
Posts: 440



Thanked: 31 times
My Contributions
Sure! I'll do it, but first you must make me a taquito, and hand deliver it to me. The code will be exchanged for the taquito upon delivery.
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: Make Me A C Program.
19 Jul, 2008 - 07:16 AM
Post #4

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,522



Thanked: 96 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
I'll do it for a better price than a taquito... your soul. Hand delivered.
User is offlineProfile CardPM
+Quote Post

Delta_Echo
RE: Make Me A C Program.
19 Jul, 2008 - 11:15 AM
Post #5

D.I.C Regular
***

Joined: 24 Oct, 2007
Posts: 439


My Contributions
I will do it for a bag of chips.
User is offlineProfile CardPM
+Quote Post

prajayshetty
RE: Make Me A C Program.
19 Jul, 2008 - 11:32 AM
Post #6

D.I.C Head
Group Icon

Joined: 27 Apr, 2007
Posts: 230


Dream Kudos: 25
My Contributions
thats a easy program my friend go give a try and we will help u out

This post has been edited by prajayshetty: 19 Jul, 2008 - 11:33 AM
User is offlineProfile CardPM
+Quote Post

KYA
RE: Make Me A C Program.
19 Jul, 2008 - 12:32 PM
Post #7

#include <nerd.h>
Group Icon

Joined: 14 Sep, 2007
Posts: 4,776



Thanked: 91 times
Dream Kudos: 1200
My Contributions
I'll do one step better then gabe:

I want pictures of your soul sent through express mail and then I want it hand delivered to me by the fat guy off of King of Queens.
User is online!Profile CardPM
+Quote Post

Delta_Echo
RE: Make Me A C Program.
19 Jul, 2008 - 12:56 PM
Post #8

D.I.C Regular
***

Joined: 24 Oct, 2007
Posts: 439


My Contributions
Really, what kind of person just comes onto a forum and says "MAKE ME A PROGRAM!".
If your in a college or something and you think that programs are just going to hand it all to you, then your either stoned or very arrogant.

Write some code and then we wil be happy to help with any problems.

You've just been flamed.
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Make Me A C Program.
19 Jul, 2008 - 12:57 PM
Post #9

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,983



Thanked: 125 times
Dream Kudos: 8525
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Get me Axel's sister and Ill make your program
User is offlineProfile CardPM
+Quote Post

Delta_Echo
RE: Make Me A C Program.
19 Jul, 2008 - 01:01 PM
Post #10

D.I.C Regular
***

Joined: 24 Oct, 2007
Posts: 439


My Contributions
For step one, the password, just use something like:
CODE


int num;
string input;
string password = "something";

while (num != 3){
cin.getline(input);
if (input != password){
   cout << "Incorrect Password!\n";
   cin.get():
   num++;
}
return 1;


note:
thats C++, and the syntax might be off,
but i don't have time to write perfect code for this post.
Its just an example.

Run with it.


User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Make Me A C Program.
19 Jul, 2008 - 11:39 PM
Post #11

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 3,906



Thanked: 34 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
Many members have posted their solutions as Code Snippets.
Visit the Code Snippets section.
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Make Me A C Program.
19 Jul, 2008 - 11:44 PM
Post #12

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,435



Thanked: 64 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
I did this code for you, at no cost. No taquito, no soul.

Only thing is, I wrote it down on a sheet of paper, folded it up into a paper plane, & threw it to you. It didn't go very far. Better luck next time.
User is offlineProfile CardPM
+Quote Post

3 Pages V  1 2 3 >
Closed TopicStart new topic
Time is now: 12/1/08 06:05PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month