hello. i really didn't solve any of your problems.....I got real bored and I thought that your idea was neat so I made my own program very similar to yours....just because i'm real new to programming and wanted to know if i could repeat a similar effect without looking at your code...i did.....mine prints out properly....its structure alot different than yours and probably a bit simpler....here it is.
Code:
#include <stdio.h>
void main()
{
int a=0,b=0,c=0,d=0,e=0;
int students;
int x=1;
char answer;
printf("\n\t\t\t**************************");
printf("\n\t\t\t* The Clicker Poll *");
printf("\n\t\t\t**************************");
printf("\n\n\n\t\t\t Only A,B,C,D, or E ");
printf("\n\n\n\tNumber of Students that Clicked in : ");
scanf("%i",&students);
while (students>0) {
printf("\tStudent #%i Answered: ",x);
scanf("%s",&answer);
if ((answer=='A') || (answer=='a')) {
a++; }
if ((answer=='B') || (answer=='b')) {
b++; }
if ((answer=='C') || (answer=='c')) {
c++; }
if ((answer=='D') || (answer=='d')) {
d++; }
if ((answer=='E') || (answer=='e')) {
e++; }
students--;
x++;
}
printf("\n\n\t\t\t ** GRAPHED **");
printf("\n\t\t");
printf(" Clicked A (%d Responses): ",a);
while (a>0) {
printf("*");
a--; }
printf("\n\t\t");
printf(" Clicked B (%d Responses): ",b);
while (b>0) {
printf("*");
b--; }
printf("\n\t\t");
printf(" Clicked C (%d Responses): ",c);
while (c>0) {
printf("*");
c--; }
printf("\n\t\t");
printf(" Clicked D (%d Responses): ",d);
while (d>0) {
printf("*");
d--; }
printf("\n\t\t");
printf(" Clicked E (%d Responses): ",e);
while (e>0) {
printf("*");
e--; }
printf("\n\n\t\t...press any key to continue...");
}
The output looks like:
Code:
**************************
* The Clicker Poll *
**************************
Only A,B,C,D, or E
Number of Students that Clicked in : 6
Student #1 Answered: A
Student #2 Answered: C
Student #3 Answered: D
Student #4 Answered: D
Student #5 Answered: E
Student #6 Answered: A
** GRAPHED **
Clicked A (2 Responses): **
Clicked B (0 Responses):
Clicked C (1 Responses): *
Clicked D (2 Responses): **
Clicked E (1 Responses): *
you get the idea...hope you gets yours to work. sorry i couldnt offer much assistance i could never get yours to compile right for me...