O Level Exam : Practical Question
📝 HTML
🎨 CSS
⚡ Java Script
# include <stdio.h> void main() { int a=0,b=0,o=0,i; char v; clrscr(); printf(“\tPress A or B\n”); for(i=1;i<=3;i++) { printf(“\n\nVoter no. %d”,i); printf(“Enter Vote :”); v=getche(); v=toupper(v); if(v==‘A’) a++; else if(v==‘B’) b++; else o++; } printf(“\n\n Status of vote(s) \n”); printf(“\nA secures %d vote(s).”,a); printf(“\nB secures %d vote(s).”,b); printf(“\nInvalid votes %d.”,o); getch(); }
▶ Run Code
🖥 Output: