PreTest Loop & toupper

#include <stdio.h> // for printf and scanf
#include <stdlib.h>// for atof


main()
{
int num;
int c =0, sum =0;
char ans, ch1, ch2;

ch1 = toupper('a');
printf("%c\n",ch1);
ch2 = toupper ('A');
printf("%c\n",ch2);

ch1 = tolower('A');
printf("%c\n",ch1);
ch2 = tolower ('a');
printf("%c\n",ch2);

printf("Would you like to enter data? (y/n) : ");
fflush(stdin);// Flushing the input stream.
scanf ("%c", &ans); // Flushing the input stream.
while (toupper (ans) == 'Y')
    {

        printf ("Enter an integer : ");
        fflush(stdin);// Flushing the input stream.
        scanf ("%i", &num);
        c ++; // counting the numbers entered.
        sum += num; // adding the numbers entered.
        printf ("again? (y/n): ");
        fflush(stdin);// Flushing the input stream.
        scanf ("%c", &ans);
}

printf("The sum is%3i\n",sum);

return 0;
}
/*
A
A
a
a
Would you like to enter data? (y/n) : y
Enter an integer : 3
again? (y/n): y
Enter an integer : 4
again? (y/n): y
Enter an integer : 2
again? (y/n): n
The sum is 9
*/