Jump to content

Anyone Know How to Program in C?


Recommended Posts

What happens if you type an m at that point, and what happens if you type another character at that point?

program2.jpg

that^

*edit with that b! command it makes the first question come up again once the second is answered correctly

Edited by IH8PunkRok

-Matt

2005 Dodge Magnum RT
JVC KD-AVX1

2 PPI S580.2

Obsidian Audio ST1 Horn Tweeters

PRV 8MB450s

Audio Legion 3500.1D

2 RE MT 18s

360 ah LiFePO4 Battery
SHCA 2/0

155.2 @ 29 hz



Kicker CVR 15's build
DD 3512e build
Mini T-Line Build
(6) 8s Build
Nightshade 15s Wall Build
Magnum AB XFL 12s Build
Newest Magnum Build

Link to comment
Share on other sites

change the while statement to b != 'm' instead of b== 'all the letters'.

When you input the m, the program should go back and ask you to input the opposite of 666 again, since 999 is less than 1000. It does not like the condition of that while statement.

I thought you had to say while (b=='a' || b=='b' || b=='c' . . .etc. || is the OR statement.

change it to b != 'm' and run it.

Wish I had a C compiler.

Brian

Current system:

1997 Blazer - (4) Customer Fi NEO subs with (8) American Bass Elite 2800.1s

Previous systems:

2000 Suburban - (4) BTL 15's and (4) IA 40.1's = 157.7 dB at 37 Hz.

1992 Astro Van - (6) BTL 15's and (6) IA 40.1's = 159.7 dB at 43 Hz.

Link to comment
Share on other sites

i believe the program im using was free. its called bloodshed dev-c++

program3.jpg

it did what you said it would

-Matt

2005 Dodge Magnum RT
JVC KD-AVX1

2 PPI S580.2

Obsidian Audio ST1 Horn Tweeters

PRV 8MB450s

Audio Legion 3500.1D

2 RE MT 18s

360 ah LiFePO4 Battery
SHCA 2/0

155.2 @ 29 hz



Kicker CVR 15's build
DD 3512e build
Mini T-Line Build
(6) 8s Build
Nightshade 15s Wall Build
Magnum AB XFL 12s Build
Newest Magnum Build

Link to comment
Share on other sites

type 999 for the number, then m for the letter, then type in 555 for the number. Should ask for the number again without anything about the letter. When it does, type 1001.

Want to see what the first loop does and if the program will actually end.

Edited by bkolfo4

Current system:

1997 Blazer - (4) Customer Fi NEO subs with (8) American Bass Elite 2800.1s

Previous systems:

2000 Suburban - (4) BTL 15's and (4) IA 40.1's = 157.7 dB at 37 Hz.

1992 Astro Van - (6) BTL 15's and (6) IA 40.1's = 159.7 dB at 43 Hz.

Link to comment
Share on other sites

did that^ and the program ended. just shut itself

btw thanks for the help man

Edited by IH8PunkRok

-Matt

2005 Dodge Magnum RT
JVC KD-AVX1

2 PPI S580.2

Obsidian Audio ST1 Horn Tweeters

PRV 8MB450s

Audio Legion 3500.1D

2 RE MT 18s

360 ah LiFePO4 Battery
SHCA 2/0

155.2 @ 29 hz



Kicker CVR 15's build
DD 3512e build
Mini T-Line Build
(6) 8s Build
Nightshade 15s Wall Build
Magnum AB XFL 12s Build
Newest Magnum Build

Link to comment
Share on other sites

did that^ and the program ended. just shut itself

did you type 999 the first time or 666? I messed up when typing.

Current system:

1997 Blazer - (4) Customer Fi NEO subs with (8) American Bass Elite 2800.1s

Previous systems:

2000 Suburban - (4) BTL 15's and (4) IA 40.1's = 157.7 dB at 37 Hz.

1992 Astro Van - (6) BTL 15's and (6) IA 40.1's = 159.7 dB at 43 Hz.

Link to comment
Share on other sites

did that^ and the program ended. just shut itself

btw thanks for the help man

If you do not type 999 the first time, it should say incorrect and ask again as long as the number you typed was below 1000. . .anything over 1000 should end the program.

Current system:

1997 Blazer - (4) Customer Fi NEO subs with (8) American Bass Elite 2800.1s

Previous systems:

2000 Suburban - (4) BTL 15's and (4) IA 40.1's = 157.7 dB at 37 Hz.

1992 Astro Van - (6) BTL 15's and (6) IA 40.1's = 159.7 dB at 43 Hz.

Link to comment
Share on other sites

i typed 999 the first time. i figured the 666 was a typo

but yea when i typed 1001 it ended

the only thing is it will ask the second question once and not wait for a response before giving away the incorrect answer response

-Matt

2005 Dodge Magnum RT
JVC KD-AVX1

2 PPI S580.2

Obsidian Audio ST1 Horn Tweeters

PRV 8MB450s

Audio Legion 3500.1D

2 RE MT 18s

360 ah LiFePO4 Battery
SHCA 2/0

155.2 @ 29 hz



Kicker CVR 15's build
DD 3512e build
Mini T-Line Build
(6) 8s Build
Nightshade 15s Wall Build
Magnum AB XFL 12s Build
Newest Magnum Build

Link to comment
Share on other sites

It is buffering the new line when you hit enter after typing 999.

Make this change and try it:

if (a==999) {

printf("\nCorrect\n");

printf("Next Question\n");

printf("\n");

do {

scanf("%c" , &B);

printf("\nThe 13th letter of the alphabet is:");

scanf("%c" , &B);

if (b=='m') {

printf("\nCorrect\n");

printf("Next Question\n");

Edited by bkolfo4

Current system:

1997 Blazer - (4) Customer Fi NEO subs with (8) American Bass Elite 2800.1s

Previous systems:

2000 Suburban - (4) BTL 15's and (4) IA 40.1's = 157.7 dB at 37 Hz.

1992 Astro Van - (6) BTL 15's and (6) IA 40.1's = 159.7 dB at 43 Hz.

Link to comment
Share on other sites

sorry, add it here:

if (a==999) {

printf("\nCorrect\n");

printf("Next Question\n");

printf("\n");

do {

scanf("%c" , &B);

printf("\nThe 13th letter of the alphabet is:");

scanf("%c" , &B);

if (b=='m') {

printf("\nCorrect\n");

printf("Next Question\n");

In the other position, it will only work one time - it will not work the second time if you input the wrong letter.

Current system:

1997 Blazer - (4) Customer Fi NEO subs with (8) American Bass Elite 2800.1s

Previous systems:

2000 Suburban - (4) BTL 15's and (4) IA 40.1's = 157.7 dB at 37 Hz.

1992 Astro Van - (6) BTL 15's and (6) IA 40.1's = 159.7 dB at 43 Hz.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Who's Online   1 Member, 0 Anonymous, 1666 Guests (See full list)

×
×
  • Create New...