Quantcast
Viewing all articles
Browse latest Browse all 40121

look at this c program and check the answer and correct it...

include<stdio.h>

void main() { int x,y; char ch; do{ printf("\n press '1' for addition"); printf("\n press '2' for substraction"); printf("\n press '0' for exit \n"); scanf("%c",&ch); if(ch=='1'||ch=='2') { printf("enter the values of x and y \n"); scanf("%d%d",&x,&y); } switch(ch) { case '1':printf("addtion=%d",(x+y)); break; case '2':printf("substraction=%d",(x-y)); break; case '0': break; default: printf("incorrect entry"); break; }

} while(ch!='0'); getch();

}


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>