Code:
char ch;
for(;
{
printf("Want to quit then Press k  Key\n");
fflushstdin);
scanf("%c",&ch);
if(ch=='k')
  break;
printf("please enter number here:\n");
fflush(stdin);
scanf("%d",&number);
total +=number;
nums++;
}

I dont know what you want. lot of different ways you can doit. Just tell If you want something different?

Last edited by shabbir; 9May2008 at 11:28.. Reason: Code block