Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What is happening is that when you read a char for "do you want to do another transaction" it is returning the next character from the last scanf. You can fix this by making sure that unused characters are flushed. One way to do this is to add

void flush_stdin()
{
    int c;

    while ((c = fgetc(stdin)) != '\n' && c != EOF);
}

and call it after every scanf. Now, this may not be the best way (my C is quite rusty). I have a few m ore comments...

In the following:

case 'w':case 'W':
    printf("How much would you like to withdraw?\n");
    if (((withdrawal== 0) || (withdrawal== -1))){
        printf("You have insufficient funds");
    }

you haven't done any input for withdrawal.

In the following, balance needs to have an initial value.

case 'b':case 'B':
    printf("Checking your account balance\n");
    balance=displaybalance(balance);
    break;

Same thing for amount here

case 'd':case 'D':
    printf("How much would you like to deposit?\n");
    deposit=getdeposit(amount,balance);
    break;

I strongly suggest you adopt a consistent formatting style. You are using both the

statement {
    statement
}

form as well as

statement
{
    statement
}

form. Use one or the other. Not both.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You will have to change the WHERE clause to something like

WHERE DATEPART(month,TanggalLahir) = 9
  AND DATEPART(day,TanggalLahir) BETWEEN 1 AND 15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Now that you have upgraded, your computer is registered with Microsoft and you will no longer have to validate it. What I suggest is that you do a full backup to external media then completely wipe your system and reinstall Win10 from scratch. I don't know how big your drive is but I suggest windows and apps on the C drive (100-120gig) and everything else on D. You should relocate My Pictures, My Documents, etc to D as well. Install Macrium Reflect (free) or some other disk imaging software on C and take regular images of C to guard against loss/disaster.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Here's another example of MS idiocy. There is no way to change the size of displayed text in Skype. The given font apparently only comes in micro which is murder on my ancient eyes. Just about every other software allows you to set the font and Windows allows you to zoomin/ont with CTRL-WHEEL. Bu Skype, which seems to ask me to install an update every other week doesn't have this feature.

I'm not saying Windows is bad. I love it, but I have to shake my head at what is left out.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If I might suggest something, I use a great free tool called Everything. I find it very useful to instantly find things when I don't know exactly where they are. As nullptr stated, the files may have been moved, not lost. In any case, why don't you have a backup? If your files "go away" and you don't have a backup then shame on you.

rproffitt commented: Thanks for Everything. +12
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I suspect the "hide extensions" option in Explorer has been turned back on. Go to folder options and deselect it and see if that fixes the problem.

Yes, it's MS stupidity to have that enabled by default. Or even to have the option (IMO).

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Care to elaborate so we can all avoid the same fate?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You don't have to upload a picture. Just post your code and tell us what isn't working. You've told us what you want to do but not where you are hung up. We are not going to write your code for you. That's not "help me". That's "do this for me".

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Show us what you have tried so far.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I follow good and accepted practices and principles, just not blindly. But you are correct in that it's better to develop the habit early. One can relax it later when one is older and (possibly) wiser ^_^

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

In this case I think that using constants is unnecessary. It adds nothing to the code simply because the actual values are so obvious that the constants add only to the length of the overall code.

quarters = (change1 % 100) / 25;

is pretty self-explanatory and making a const for 25 is tantamount to adding comments like add one to x. If you feel otherwise I would suggest

quarters = (change1 % 100) / 25;    \\ 25 = cents in a quarter

I don't feel like coding this up in c/c++ (I'm quite rusty) but a vbScript version is

set arg = Wscript.Arguments

if arg.Count <> 2 then
    wscript.echo "change cost cash"
    wscript.quit
end if

cost = Int(cdbl(arg(0)) * 100)
cash = Int(cdbl(arg(1)) * 100)

set denom = CreateObject("Scripting.Dictionary")
    denom(10000) = Array("hundred","hundreds")
    denom( 5000) = Array("fifty","fifties")
    denom( 2000) = Array("twenty","twenties")
    denom( 1000) = Array("ten","tens")
    denom(  500) = Array("five","fives")
    denom(  100) = Array("one","ones")
    denom(   25) = Array("quarter","quarters")
    denom(   10) = Array("dime","dimes")
    denom(    5) = Array("nickel","nickels")
    denom(    1) = Array("penny","pennies")

balance = cash - cost

for each denomination in denom.keys

    num = balance \ denomination

    if num > 0 then
        if num = 1 then
            wscript.echo num,denom(denomination)(0)
        else
            wscript.echo num,denom(denomination)(1)
        end if
        balance = balance - num * denomination
    end if

next

Slightly complicated with a dictionary because I wanted to handle both singular and plural amounts.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A suggestion...

There is a possibility that there will eventually be a presidential library bearing Trump's name. I propose that it be mandated to contain no books above a grade four reading level.

And it be built in Miami at just slightly above sea level.

Agilemind commented: and at least one cabinet of random bits of paper with his signature on. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Use an if statement as in

if (dollars > 0) {
    cout << "Dollars: " << dollars << endl;
}

In this case I think it would be acceptable to use a single line format as

if (dollars > 0) cout << "Dollars: " << dollars << endl;
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Remember, this is a country that pronounces Favre as "farve". Then again, the British gave us "FEN-shaw" for Fetherstonehough and "CAR-key" for khaki so who am I to judge?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Read what I posted. His name is four simple syllables. No "silents". It was just explained how to pronounce his name, and they still got it wrong. And how many English speaking people in the media (whom I assume have more than a basic education) have never heard the word, chapeau? I can imagine Jethro Bodine pronouncing it SHA-poe, but not a tennis commentator.

I recall an episode of All in the Family where Archie goes to talk to a local priest. The regular guy is away and he has to talk to the fill-in, a man named Chang. Even after repeated corrections, Archie keeps calling him Reverend Ching. Eventually the reverend calls him Mr. Binker, at which point Archie gets offended.

It's a matter of professional competence as well as respect. "You are not important enough for me to put in the minimal effort to say your name correctly."

I worked with a guy whose last name was Bjornnson. A co-worker insisted on pronouncing it bah-jorn-son. Now imagine if the announcers insisted on referring to one well-known tennis player as bah-jorn Bork, or the singer as bah-jork? It starts to rankle very quickly.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

In the United States, high taxes are enough to fully reimburse all damages from hurricanes from the federal budget

I'm waiting to see who gets reimbursed and who doesn't. You might want to check out the documentary, The Big Uneasy, to see how it worked with Hurricane Katrina.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I read something recently about how eating vegetables raw rather than cooked could be slightly healthier. The author lamented that his findings would likely be reported on TV as

The Way You Are Eating Vegetables May Lead To An Early Death
rproffitt commented: I served up okra and worry my guests were plotting my demise. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Wasn't that already a problem? Roundup-resistence isn't a novel thing

It's not so much Roundup as Dicamba. And it's not a problem with resistance. The problem is when the pesticide is sprayed, then drifts onto crops in neighbouring fields that grow crops that are not GMed to be resistant. Monsanto modified cotton and soybeans to to be resistant to Dicamba (introduced in 1942) which is known to be particularly destructive in drifting. Twenty states have reported crop damage over more than three million acres. One peach farmer lost over 30,000 trees due to Dicamba drift.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

... that almost all public washroom doors open "in" so that even if you fastidiously wash your hands you still have to grasp the pull-bar to open the door to leave, effectively touching the hands of everyone who did not wash.

As a side note - you always do up your pants and belt before washing your hands but nobody ever washes their belt so exactly how filthy is that thing?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I went to his website. I'll definitely be doing some browsing there. Thanks. Another good read is An Apple a Day by Joe Schwarcz. Mostly good but I disagree with his position on GMOs, not necessarily because of the actual GMO product but the side effects like severe damage to neighbouring farms due to drifting of the extreme amount of pesticides used on the Roundup-Ready (and other-Ready) crops. I've exchanged a few emails with him. He is very open to (informed) discussion on the topics in the book.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you've done a factory reset you might try looking it up on router default passwords

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Modems can just stop working for a number of reasons ranging from a power spike to shorting out due to water, or catastrophic failure due to being crushed by a ten ton weight.

If you want any useful suggestions then please provide more information. Can you connect using a cable? Have you tried doing a factory reset? What is the modem connected to? Have you tried calling your ISP for help?

Information, please.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

... how every six months "a new study" comes out that claims that the stuff that was killing you is now considered healthy.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

... how the same politicians who said that New Jersey should just man up and take care of themselves after Hurricane Sandy hit, are now calling for federal aid from FEMA for relief from Hurricane Harvey, and in a few days, probably Hurricane Irma.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It' hard to be a commentator and have to know it all.

I agree. My last name is Dutch (de Graff) but, fortunately, it is pronounced like it looks. Even easier, because it is two words with the first word lower case, it lends itself to the correct inflection.

Having said that, when your job as a sports commentator involves frequently saying players' names, AND that particular player is the topic of the week, AND that player's name doesn't consist of strings of consanants like Chmzcz (with no obvious pronunciation), AND you just finished airing an interview with the player where he explained how to pronounce his name, then it's really NOT that hard.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It used to be that "if you aren't paying for it then YOU are the product". What the manufacturer is doing is vile. Unfortunately, if the others follow suit we'll be left with no choice other than "if you don't like it then don't buy it."

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

By the way, you may have noticed, just under the buttons labeled Start New Discussion and Realtime Chat, there is a menu bar that looks like

All   New   Solved   Unanswered   More

If you go to the Programming section and click on More it expands to

News Stories
Product Reviews
Interviews
Tutorials
Code Snippets

You might want to browse Tutorials and Code Snippets.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Welcome. If this is what you were looking for then please mark this thread solved. If not then feel free to post follow-up questions here.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can find code samples for that in my snippets post here

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Or you can join one of the general discussinons in the Community Forum.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Do you recall WKRP in Cincinatti with Les Nesman's pronunciation of chihuahua? Hint. It was chi-hoo-a-hoo-a. Since these people basically just read stuff off the teleprompters, wouldn't it be a good idea to put these words in phonetic form?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Greetings.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

@rproffitt - As I recall, they tried to unplug it. Didn't work out too well for Ensign Ricky.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I don't do videos at the cottage (data cap) but the proper way is

WIM-bull-dun
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

An episode of the 1950s western TV series 'Trackdown' featured a character named Walter Trump who claimed he would build a wall in order to protect a town from the end of the world.

Source Snopes

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

New Rule: If you pronounce it WIM-ble-TON then you can't work as a tennis commentator.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Aaaaarrrrggghhhhh!!!!!!

Just finished watching Global News out of Winnipeg (Canada) where they had a new story about him. And of course they got his name wrong.

I can no longer look down on (most) American sportscasters.

I think I'll just go sit on my front steps and chase neighbourhood kids off my lawn.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What are the qualifications to be an announcer/commentator at the US Open? Clearly it's not the ability to be able to pronounce the names of the players.

Someone who has been making a big splash of late is an 18 year-old Canadian named Denis Shapovalov. At the start, when nobody knew who he was, the announcers would pronounce his name

SHOP-uh-VAL-ov

Semi-understandable for most of us but certainly not for people whose job it is to comment on players with mostly foreign names. But it gets worse.

Shapovalov didn't qualify for the US Open in time (he didn't get his boost in ranking until the end of the Rogers Cup) and wasn't expected/expecting to play, however, because Milos Raonic (Canadian) dropped out due to surgery, Denis made the cut. Every time he plays now they include a segment where the announcers debate how to pronounce his name. Sometimes they will even play a clip where he is interviewed after a match saying

It's pronounced like a French hat chapeau-valov (sha-POE-val-OV)

And then they all promptly go back to mispronouncing it. To me that's either a sign of disrespect or incompetence, or possibly both. I'm thinking more disrespect since they asked the question but clearly weren't interested in the answer.

Yes. It's a small thing but it's like fingernails on a blackboard when I have to listen to it a hundred times a match.

Also, yes, my wife knew I screamed at the TV when she married me.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I suppose "Please wait while Windows searches for a solution" is more appeaking than "Please wait while Microsoft scans your computer for all of your personal information".

That was a joke.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Assuming so, I don't think there would be a battle to re-enact there. There's this...

Maybe they just get together over beer and po' boys and sing The Battle of New Orleans

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Or even more to the point, is the statue erected on a spot where it was a favourite pastime to lynch black people? Speaking of which, where are the statues commemorating the more than 4000 people who were lynched? Why put of statues of the people who fought to preserve that type of system?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There is no error in the code, For future reference please read the Daniweb Posting Rules. Particularly the part about hijacking old threds.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Does it work with a direct cable connection?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

it is in the past, and it wasn't that bad anyway.

Always said by people on the lighter end of the spectrum.

I think it is in our DNA. People who were "tribal" oriented had a better chance of survival than those who were individuals. Republicans, moreso than Democrats are inclined to use the "us vs them" arguments to force people to take sides (and then defend that choice in the face of evidence to the contrary). It doesn't help that the media bends over backwards to be fair to both sides. Take Trump's statement that there were good people marching with the neo-nazis. Is that true? Do both sides deserve an equal voice just because they are taking opposite viewpoints. What if a group of pedophiles were marching? Is their viewpoint just as valid as those who are anti-pedophile?

Some of the more intelligent conservatives actually realize this and consciously accept their deal with the devil

IMO the person who holds down the rape victim for the rapist is as guilty as the rapist. Silence implies consent.

I have an acquaintance (I can no longer call her a friend) who supported Trump during the election because "Hillary would be so much worse". she considers herself a good Christian woman and somehow still manages to excuse all the shit that Trump has pulled since January.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And they will only have to pull out quickly when there is a hot beverage on the dash and a mouthful of food.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

How is it possible that, even in New York, people always manage to get a parking spot right in front of where they want to go?

How is it that one man shooting at ten men can always hit them all while those same ten men shooting back can't hit bugger all?

How is it that you can accomplish any task on a cell phone with a maximum of two clicks and there are never any compatibility problems.

And how is it that cell phones will always work flawlessly except when it is critical that they do.

How is it that no teenagers on TV ever have acne?

How is it that in real life people occasionally cough but on TV/movies that same cough usually means a pending fatal illness.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I hate shows that need to tell us what is coming up after the break, then after the break, spend two minutes recapping what happened just before the break.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Congress has managed to put sanctions against Russia with sufficient numbers to prevent a presidential veto and are working to prevent Trump from firing Mueller. In light of Trump's pardoning of Arpaio, their next step should be to suspend the presidential pardon power. Trump's message was clear. He pardoned Arpaio and anyone who sticks with him can do whatever it takes to protect the prez knowing that Trump has the pardon in his back pocket. Federal laws no longer apply to Trump supporters as long as Trump has that power.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I mean how difficult is it to say that Nazis suck?

Apparently it's a lot easier to say Rosie O'Donnell sucks than Nazis. Rosie is clearly the devil. As for the statues, Jefferson Davis stood in the way of progress. I can't quite say the same for Washington, Jefferson, etc.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster