# CRiouz CRiouz's Profile

 Points: 17

## Contact

 CRiouz CRiouz April 11, 2017 · Public

Anyone knows how to install "graphics.h" in code blocks

 CRiouz CRiouz  >>  Bucky Roberts March 24, 2017 · Public

I want to create the Temperature Converter but it calculated the number wasn't right. How can I solve this. (Code is down below thx)

#include
#include
#include
#include
#include

int main()
{
char choice;
int qCelcius;
int qFahrenheit;
float cCelcius = ((qCelcius * 18) + 32);
float cFahrenheit = ((qFahrenheit - 32) / 18);

printf("!!!This is Temperature Converter program!!!\n\n");
printf("Type in A for Celsius to Fahrenheit\tor\tB for Fahrenheit to Celsius\n");
scanf(" %c", &choice);
if(choice = 'a'){
printf(" Enter your celsius temperature --> ");
scanf(" %d", &qCelcius);
printf("This is a fahrenhiet temperature %.2f", cCelcius);
}else{printf(" Enter your fahrenhiet temperature --> ");
scanf(" %d", &qFahrenheit);
printf("This is a celsius temperature %.2f", cFahrenheit);
}

return 0;
}

 CRiouz CRiouz  >>  Bucky Roberts March 22, 2017 · Public

I wrote a multiple choices exam. The issue is after I answered the first question the 2nd and 3rd show up at the same time. The 4th and 5th question have this problem as well. So.... can you guys help me solve this thx.

#include
#include

int main()
{
char firstchoice;
char secondchoice;
char thirdchoice;
char forthchoice;
char fifthchoice;
int score=0;

printf("27 * 28 = ?\n");
printf("a) 756\t b) 546\n");
scanf("%c", &firstchoice);
(firstchoice == 'a') ? ++score : --score;

printf("___ you been to china?\n");
printf("a) Have\t b) Did\n");
scanf("%c", &secondchoice);
(secondchoice == 'a') ? ++score : --score;

printf("What does pH stands for?");
printf("a) power of hydrogen\t b) potential for hydrogen\n");
scanf("%c", &thirdchoice);
(thirdchoice == 'b') ? ++score : --score;

printf("Mushroom is in which species?\n");
printf("a) Fugi\t b) Mamals\n");
scanf("%c", &forthchoice);
(forthchoice == 'a') ? ++score : --score;

printf("Is 2 to the power of 6 greater than 76\n");
printf("a) Of couse, pretty sure it is\t b) No way, it cant be possible\n");
scanf("%c", &fifthchoice);
(fifthchoice == 'b') ? ++score : --score;

return 0;
}

 CRiouz CRiouz  >>  Bucky Roberts March 19, 2017 · Public

Hello!! I tried to create a simple multiple choices test using "a" and "b" choices. But after I ran this program and type ans in.... it crashed. Can you guys plz help me solve out what have I done wrong. (The code is down below. thx)

#include
#include

int main()
{
char firstchoice;
int score=0;

printf("1+1=?\n");
printf("a) 2\t b) 3\n");
scanf("%c\n", firstchoice);
(firstchoice == 'a') ? ++score : --score;

return 0;
}

Bucky Roberts