PHC-KILATIS12
Eternal Poster
- Joined
- Apr 4, 2017
- Posts
- 705
- Reaction
- 432
- Points
- 314
- Age
- 29
So here it is guys I'm doing this project since last last week I'm almost done but till now di ko parin masolusyunan tong problema ko taeeee hahahhaah so here's the sample of what I'm doing
So my problem is hindi ko mapalabas na ang score per questions ay true = 1 and false = 0 , ang laging score na lumalabas after 5 questions ay 300+ Sinubukan ko narin yung sinuggest saken na imbis na qc='A'; ay gawin kong if statement like this
if(qc=='A')
{
score++;
}
but still hindi parin gumana ano po kayang problema o baka ako na yung problema hahahahaha sana po matulungan nyo po ako
EDITED :
#include <stdio.h>
#include <conio.h>
#include <dos.h>
int pass,level,topic,score=0,score1=0;
main()
{
clrscr();
printf(" Enter Password :");
scanf("%d",&pass);
clrscr();
if(pass==1234)
{
textcolor(2);
printf(" Entering please wait ...");
delay(2000);
}
else
{
textcolor(4);
clrscr();
printf(" Invalid password exiting ... ");
delay(1000);
clrscr();
printf("\n3...");
delay(1000);
printf("\n2...");
delay(1000);
printf("\n1...");
delay(1500);
return 0;
}
clrscr();
printf(" What is programming ? ");
delay(3000);
printf("\n\nPlease select difficulty\n1. Easy Level\n2. Hard Level\n3. Difficult Level\n\nInput Here : ");
scanf("%d",&level);
clrscr();
printf(" Easy Level Week 1 ");
delay(5000);
switch(level)
{
char qc,qv;
case 1:
printf("\n\nQuestion 1 : Expand IT. \n\nA. Information Technology\nB. Incorporated technology\nC. Information torture\n\nInput Here : ");
qc='A';
scanf("%s",&qc);
delay(2000);
clrscr();
printf("\n\nQuestion 2 : Expand CPU. \n\nA. Central processing universe\nB. Center phone user\nC. Central processing unit\n\nInput Here :");
qc='C';
scanf("%s",&qc);
delay(2000);
clrscr();
printf("\n\nQuestion 3 : Expand RAM.\n\nA. Read and memorize\nB. Random Access Memory\nC. Read and mark\n\n Input Here : ");
qc='B';
scanf("%s",&qc);
delay(2000);
clrscr();
printf("\n\nQuestion 4 : Expand ROM.\n\nA. Random only memory\nB. Read only memory\nC. Read on motherboard\n\n Input Here :");
qc='B';
scanf("%s",&qc);
delay(2000);
clrscr();
printf("\n\nQuestion 5 : Expand GPU.\n\nA. Graphics processing unit\nB. Google para umandar\nC. Gold processing unit\n\n Input Here:");
qc='A';
scanf("%s",&qc);
delay(2000);
clrscr();
score=qc;
printf("Total score :%d",score);
delay(2000);
clrscr();
if(score>=3)
{
printf(" You passed 1st week proceeding to week 2 please wait ...");
}
else
{
printf(" you failed better luck next time exiting ... ");
delay(2000);
return 0;
}
delay(2000);
clrscr();
printf(" Week 2 ");
delay(3000);
clrscr();
printf("\n\nQuestion 1 : Which one is the first search engine in internet. \n\nA. Google \nB. Archie\nC. Altavista\n\n Input Here : ");
qv='B';
scanf("%s",&qv);
delay(2000);
clrscr();
printf("\n\nQuestion 2 : Number of bit used by the IPv6 address. \n\nA. 32 bit\nB. 64 bit\nC. 128 bit\n\n Input here : ");
qv='C';
scanf("%s",&qv);
delay(2000);
clrscr();
printf("\n\nQuestion 3 : Which one is the first web browser invented in 1990. \n\nA. Nexus\nB. Internet Explorer\nC. Mozilla\n\n Input Here :");
qv='A';
scanf("%s",&qv);
delay(2000);
clrscr();
printf("\n\nQuestion 4 : Which of the following programming language is used to create program like applets ? \n\nA. COBOL\nB. C Language\nC. Java\n\n Input Here : ");
qv='C';
scanf("%s",&qv);
delay(2000);
clrscr();
printf("\n\nQuestion 5 : First computer virus is known as. \n\nA. Rabbit\nB. Creeper Virus\nC. SCA Virus\n\n Input Here : ");
qv='B';
scanf("%s",&qv);
delay(2000);
clrscr();
score1=qv;
printf(" Total score :%d",&qv);
delay(2000);
clrscr();
if(score1>=3)
{
printf(" You passed week 2 proceeding to week 3...");
}
else
{
printf(" You failed ... exiting ");
delay(2000);
clrscr();
return 0;
}
delay(2000);
clrscr();
}
getch();
}
So my problem is hindi ko mapalabas na ang score per questions ay true = 1 and false = 0 , ang laging score na lumalabas after 5 questions ay 300+ Sinubukan ko narin yung sinuggest saken na imbis na qc='A'; ay gawin kong if statement like this
if(qc=='A')
{
score++;
}
but still hindi parin gumana ano po kayang problema o baka ako na yung problema hahahahaha sana po matulungan nyo po ako
EDITED :
#include <stdio.h>
#include <conio.h>
#include <dos.h>
int pass,level,topic,score=0,score1=0;
main()
{
clrscr();
printf(" Enter Password :");
scanf("%d",&pass);
clrscr();
if(pass==1234)
{
textcolor(2);
printf(" Entering please wait ...");
delay(2000);
}
else
{
textcolor(4);
clrscr();
printf(" Invalid password exiting ... ");
delay(1000);
clrscr();
printf("\n3...");
delay(1000);
printf("\n2...");
delay(1000);
printf("\n1...");
delay(1500);
return 0;
}
clrscr();
printf(" What is programming ? ");
delay(3000);
printf("\n\nPlease select difficulty\n1. Easy Level\n2. Hard Level\n3. Difficult Level\n\nInput Here : ");
scanf("%d",&level);
clrscr();
printf(" Easy Level Week 1 ");
delay(5000);
switch(level)
{
char qc,qv;
case 1:
printf("\n\nQuestion 1 : Expand IT. \n\nA. Information Technology\nB. Incorporated technology\nC. Information torture\n\nInput Here : ");
qc='A';
scanf("%s",&qc);
delay(2000);
clrscr();
printf("\n\nQuestion 2 : Expand CPU. \n\nA. Central processing universe\nB. Center phone user\nC. Central processing unit\n\nInput Here :");
qc='C';
scanf("%s",&qc);
delay(2000);
clrscr();
printf("\n\nQuestion 3 : Expand RAM.\n\nA. Read and memorize\nB. Random Access Memory\nC. Read and mark\n\n Input Here : ");
qc='B';
scanf("%s",&qc);
delay(2000);
clrscr();
printf("\n\nQuestion 4 : Expand ROM.\n\nA. Random only memory\nB. Read only memory\nC. Read on motherboard\n\n Input Here :");
qc='B';
scanf("%s",&qc);
delay(2000);
clrscr();
printf("\n\nQuestion 5 : Expand GPU.\n\nA. Graphics processing unit\nB. Google para umandar\nC. Gold processing unit\n\n Input Here:");
qc='A';
scanf("%s",&qc);
delay(2000);
clrscr();
score=qc;
printf("Total score :%d",score);
delay(2000);
clrscr();
if(score>=3)
{
printf(" You passed 1st week proceeding to week 2 please wait ...");
}
else
{
printf(" you failed better luck next time exiting ... ");
delay(2000);
return 0;
}
delay(2000);
clrscr();
printf(" Week 2 ");
delay(3000);
clrscr();
printf("\n\nQuestion 1 : Which one is the first search engine in internet. \n\nA. Google \nB. Archie\nC. Altavista\n\n Input Here : ");
qv='B';
scanf("%s",&qv);
delay(2000);
clrscr();
printf("\n\nQuestion 2 : Number of bit used by the IPv6 address. \n\nA. 32 bit\nB. 64 bit\nC. 128 bit\n\n Input here : ");
qv='C';
scanf("%s",&qv);
delay(2000);
clrscr();
printf("\n\nQuestion 3 : Which one is the first web browser invented in 1990. \n\nA. Nexus\nB. Internet Explorer\nC. Mozilla\n\n Input Here :");
qv='A';
scanf("%s",&qv);
delay(2000);
clrscr();
printf("\n\nQuestion 4 : Which of the following programming language is used to create program like applets ? \n\nA. COBOL\nB. C Language\nC. Java\n\n Input Here : ");
qv='C';
scanf("%s",&qv);
delay(2000);
clrscr();
printf("\n\nQuestion 5 : First computer virus is known as. \n\nA. Rabbit\nB. Creeper Virus\nC. SCA Virus\n\n Input Here : ");
qv='B';
scanf("%s",&qv);
delay(2000);
clrscr();
score1=qv;
printf(" Total score :%d",&qv);
delay(2000);
clrscr();
if(score1>=3)
{
printf(" You passed week 2 proceeding to week 3...");
}
else
{
printf(" You failed ... exiting ");
delay(2000);
clrscr();
return 0;
}
delay(2000);
clrscr();
}
getch();
}
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
Last edited: