change line 16 to: cout << "\n |\n" ;
Horizontal is ---- not |
Blank lines can be added as Vij says by outputting a \n or endl
change line 16 to: cout << "\n |\n" ;
Horizontal is ---- not |
Blank lines can be added as Vij says by outputting a \n or endl
This type of statement shouldn't be sent unless it is warranted, and then should also be accompanied with an explanation of what infractions had been made. To the first time recipient this pro forma statement, especially in these type of circumstance and the message that followed, appears as a reprimand.
I agree. I've always been annoyed at these PMs when I did nothing wrong...
You need two loops, not 1.
For all digits before the decimal, you need to multiply the total by 10 then add the value. Byt the way use a while loop.
When you get to the decimal you need to start a new loop to deal with the characters after.
lol.. I was just bein difficult
So what else is new? :icon_wink:
Look at the prototype of the function and compare it to the definition of that function. Look for anything that doesn't match.
After you read a word, check each character and if you see a non-letter or number, it must be punctuation. Do what you need to do with it.
These are all the same basic equation.
Calculate the first value from the original value.
Use that new value and calculate again.
Repeat the specified number of times.
Some other interesting versions of scale:
http://www.phrenopolis.com/perspective/stinson2004/index.html (my favorite)
http://www.noao.edu/education/peppercorn/pcmain.html
http://www.njaa.org/sswalk/sswalk.html#null
pop = 2000
Loop 4 times
pop = pop + (pop * 30%)
end loop
Hey memory is cheap -- only cost $89.00 (USD). I have no idea what it would cost in India or UK.
And yes, I added it for just that one game.
Gee, and there are starving chil.... ahhhh, fergit it! Have another gig on me! :|
Maybe they should stop using a 300 baud modem... :twisted:
Yeah, Happy B'Day!
Happy B'Day my friend, and this is not coming from a bot... ;-)
Prove it! :icon_wink:
strings or c-strings? You need to give us more information on how your program currently is written.
...he's still got to defeat Hillary Clinton for the official nomination as the Democratic Candidate ...
If Hillary Clinton is nominated ...
But she's already been President! :icon_twisted:
So you added another gig because of a game? Isn't that a little sad? :icon_wink:
Oh and btw, if the catholics are right.. jesus tastes pretty damn good lol:D
Oh, I don't know about that. He either needs salt or peanut butter. I find the wafers pretty tasteless.
Check out these pictures, here and here!
There wasn't one argument I made that was not backed up by science and extensive testing..
The biggest thing I was annoyed at with your arguments was you simply stated a view and never backed up what you said with any facts and didn't point to any references as Christina did. Therefore, most of your arguments were void. You need to back up what you say, you can't just say it simply because you heard it somewhere. Prove it!
Thanks, but I just think I have so much more to learn...
You're welcome. And of course you do. You're 18. I'm much older and still have a lot to learn. Intelligence is not how much you know but how well you use what you already know. And this you do quite well.
I don't disagree with science at all.
Yes you do. Any scientific evidence that is at odds with a strict interpretation of the Bible you claim is false. That is a disagreement. If science contradicts the Bible, rather than looking at how to reinterpret the Scriptures to include the new information, you simply dismiss the information as bogus. It's a lot like the Warren Commission.
(The only percentage of Christians that don't believe in the Bible are the Catholics, as you claim. Hence, everyone else [[B]Protestants[/B]] does.)
Ok, I am 98% sure that all Protestants believe the Bible as literal. I mean, Baptists, …
Animal rights? Animals can't vote -- they have no rights!
Why is it that, for instance, to get a driver's licence I need to pass a psycho-test...
Have you read some of your posts? Can you blame them? :icon_twisted:
What is the NRA?
a terrorist group?
Yes :icon_razz:
The NRA is a necessary evil. I don't like how they do things, but without their lobbying efforts, we'd likely have some ridiculous half-assed gun control laws that wouldn't work at all.
Oh, the ones we have now work? Is this a definition of work I'm not familiar with?
... they're more or less defending the Second Amendment...
As long as you reinterpret the words and the meaning away from what the Founding Fathers meant. They aren't defending the 2nd. They are twisting the 2nd and fighting for that twisted reinterpretation. It's identical to a religious argument... :icon_wink:
lol.. Well, I tried to show them the error of their ways..
But I don't agree completely with you, either... The arguments are on complete opposite sides of the fence, and there is a middle ground that is probably much closer to the truth.
Well first of all, I'm not intelligent. I mean I'm smart, but that doesn't mean I know everything.
Being intelligent and knowing everything are not the same thing. You, my dear, strike me as quite intelligent.
I basically go by the Bible and what it says, it's my truth. But to show that I'm not trusting solely by faith, there's a lot of history and archaeology to back it up.
Yes there is quite a bit of archaeology, history, and science to back up much of the Bible. But not all. That does not mean the rest is complete irrevocable fact. IMO much of the Bible is a philosophy of life and is not intended to be taken literally in all cases. Especially if you have to make up stuff to prove a point -- like dinosaurs and Job, and cedar tree tails. That was all a circular argument with the proof being only conjecture.
I don't want to get back into the "bible isn't fact" part... I've already heard everything about that. But yeah, I think that question you asked has already been answered over and over again. Maybe it was just an attack against me? I don't know.
Not …
WaltP:pretty: I am sure you are having fun;) Are you sincerely ignorant of what "cording" is or is mean't to be. It is a simple typo. or don't you make mistakes:S
Of course I'm having fun! Anyone that wants someone to write his cord for him is free game for having fun. And no, I never make misteaks.... :D
Also, make sure you have braces around everything that needs braces. I think I see a spot where you are missing some.
Yeah, this thread has gotten off topic. ^.~
Somebody should ask a question to get us back on subject.
OK... You asked for it! :icon_twisted:
How can any supposedly intelligent person think that dinos and man ever coexisted?
There, that should get the ball roiling again...
Since Chaky's post #202 requesting on-topicness be resumed, only 1 of the 6 successive posts is on topic. Way to go, guys! :icon_rolleyes:
And, yes, I counted this one! :icon_twisted:
You could also search the forum -- this questions has been asked many times very recently.
i have this simple program im writing to help my dads business.
Yeah, right. Look, we don't mind helping people with their homework assignments. So you don't have to lie about it in a lame attempt to get homework help.
you can help me by copying the code to compile... and please tell me what goes wrong? thanx...
OK. It doesn't compile. That's the first thing that's wrong.
What's going wrong is obvious. You want someone else to take your code and blindly figure out
1) what it's supposed to do
2) what it really does
3) fix what they find wrong
4) repost it
so you can hand it in an get an A on your project.
Please tell us what's wrong with this.
>If the line does not start with a digit, it's a name, store it.
Ah, but what if there is a non-numeric character later on in the line? That's why I said, "If there are any non-numeric characters in it, count it as a name." However strange it sounds, I have heard of people that have numbers in their name.
Well,
1) reading the entire line prevents the obvious error when 33T is read as a score because of poor file proofreading...
2) when you meet 3v3lyn or 51Lv1a, you be sure to let me know...
:icon_twisted:
It's either a poorly written app or your system has a problem.
IMAO, everyone (and I mean everyone!!!) should follow Joe's advice. I don't know why MicroSludge like to hide important information from the user, but it's a well know fact that this feature is used to launch viruses and other nasty things. Not to mention if you have 5 files with the same name but different extensions, how do you know which one you need?
Tools -> Folder Options -> View tab -> uncheck HIDE EXTENSIONS...
Use getline()
to read each line. If the line does not start with a digit, it's a name, store it. Otherwise convert to an integer and store it with the last name read.
What type of file is it? A text file with instructions? A specially formatted help file?
How To Calculet Time Complexity Of An Algo
By reading the responses posted in this and the other link you hijacked.
Please people lets forgive him and lets move on. One hopes that the correction is heard or the light repremand is noted:X
What was the question again:?:
After a month, don't you think we've moved on? :-O Sheesh! Learn to look at the time posted...
true -- strcmp() will compare the whole line, all you want to compare are the first two characters. strncmp() will do that. If you are writing a c++ program then you can use std::string's substr() method.
char line[] = "PH - Philippines: Smart, Globe(country's telephone operator)"; if( strncmp( line, "PH",2) == 0) { // found it! }
So would a simple
if ((line[0] == 'P') && (line[1] == 'H'))
{
// found it!
}
And all the codes could be put into an array so you can use a loop to search thru them to find a match.
hi i am sending the code to count no of 5's in an array
jus see this.........#include<stdio.h>#define MAX 5#define LIMIT 5int main(void){int a[MAX]={51,5,855,55,5};int c=0,i,n,r;char b[LIMIT];for(i=0;i<MAX;i++) { n=a[i];while(n!=0){r=n%10;if(r==5){c=c+1;}n=n/10;} }printf("\ncount of 5's is : %d\n",c);return 0;}
my personal id: [email]snipped[/email]
If you are going to post code, please make sure it's readable. That's what the PREVIEW button is for. And if you're going to do someone's homework for them, make sure you get the grade because he won't deserve it.
Yeah, and I referenced your suggestion in my first post.
o.0 = smiley with one eye bigger than the other
Yeah, so what's it mean?
I would guess you call the ld system command from somewhere in your program and it returned with an error. But it's only a guess since there's no code posted to verify it.
Well that is your opinion,,,
This is the way I sent it here, because of the school I am attending,,,
If you are an expert then send me a better looking code I uploaded.
My opinion too, as well as most experts here. Check out this info about better formatting techniques, then post using the instructions on the background of the input box that explains CODE tags (or see this)
You never initialized cnt to 0 in the count() function
You'd have to show us the rest of the code that was causing the errors.
Just to simplify things a bit, don't you think you should be doing a
toupper
on the selection before processing it?
... or use a switch
statement instead of nested if
s? It could be cleaner.
Here's what I'm really having trouble with. How do I tell what element position the data came out of from my double array? I need to know that, at least I think I do to tell my char array which element to display for the name of the month with the right rainfall amount.
Simply return the index rather than the array contents:
double getLowest(double array[], int size)
{
double lowest;
lowest = 0;
for (int count = 1; count < size; count++)
{
if (array[count] < array[lowest])
lowest = count;
}
return lowest;
}
WaltP - what is your belief? - are you atheist also?
No. I'm one of those agnostic thingies. I believe there is something that is God-like (it's not sentient per se) but not as defined by major religions.
From what i rember carbon dating can have a 2-300 year error margin or mayb it was in the thousands either way i rember that it was not entriely accurate.
Hmmm, so worst case scenario, the tool found that was carboon dated to 23000 years old might only be 20000. Still well beyond the 6000 defined by some Creationists.
That seems like a shallow excuse for "I don't know." So carbon dating is a lie? Who are YOU to say that millions of scientists are wrong? It Is a SCIENTIFIC FACT that the earth is 4.5 billion years old and that evolution happens. It is as much of a fact as the fact that I have five fingers on each hand
But its not Fact though just because alot of people say its that old does not make it true.
Science says it's true. It's not an opinion made up by people just because they want it to be true.
I also do not think that there is overwelming evidence that the earth is that old and alot of the things things like fossils and rock layers etc used as an argument for this can also be explained by a world wide flood.
Then you need to read more. For one …
So why can't these 40000 people be deleted? Or is the number helpful in marketing the site?
Lol, I think it's cute! ;)
Maybe so, but it's definitely not a :wink::icon_wink:
I have trying C and so far it's gone great but this has been driving me mad today.
I could swear scanf worked earlier but its crashing my programs?
I know you get this problem when you forget the pointer thing &but this should work
#include<stdio.h> int main() { int userinput; scanf("%d",&userinput); printf("%d",userinput); getchar(); return 0; }
Im using Vc++Express with .c on my source code.
What kind of error are you getting?
I think you need to describe exactly what you are seeing because I believe your analysis of what's happening is not correct. I suspect your program is not crashing.
>Whats the ideal way to go about this?
Well, you're right -- you should make a separate function. But instead of focusing on just getting the input, perhaps you could do a bit more: call the functions which are actually going to execute what the user wants. The function would no longer need to return what the user entered, because the function itself would be handling everything after the menus, and thus main() would have no need for it.
Except in an ideal situation (my opinion of ideal at least):
1) main()
calls menu function which returns the menu entry
2) Switch statement (as suggested) will call functions to process each menu selection -- one function per menu selection