#include<stdio.h> void add(); void subtract(); int main() {int choice; printf("enter your choice:1.add 2.subtract:"); scanf("%d",&choice); switch(choice) {case 1: add(); break; default: printf("wrong choice entered"); } } void add() {int a,b; char c; do {printf("enter two numbers:");
scanf("%d %d",&a,&b); printf("%d\n",a+b); printf("do you want to continue(y/n):"); scanf("%c",&c); }while(c=='y'||c=='Y'); printf("\n"); } why second scanf inside do while not working??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.