+ 1

Hey i want to make a program in C to adding two no. Repeadly which ask u want to add more no. After every addition How can i?

Please guide me

21st Oct 2019, 3:14 AM
SHASHANK BHANDARI
SHASHANK BHANDARI - avatar
3 ответов
+ 7
Give it a shot first and show your code. Others can help you from that point.
21st Oct 2019, 3:29 AM
Sonic
Sonic - avatar
0
I mean i want to execute loop again after addition means my code ask every time after addition Do you want to add more no.
21st Oct 2019, 2:17 PM
SHASHANK BHANDARI
SHASHANK BHANDARI - avatar
0
#include <stdio.h> int main() { int a,b; char operand; printf("Please choose the operand (+,-,*,/):"); scanf("%c",&operand); printf("Enter the value of A and B"); scanf("%d %d",&a,&b); switch(operand) { case '+': printf("%d+%d=%d",a,b,a+b); break; case'-': printf("%d-%d=%d",a,b,a-b); break; case'*': printf("%d*%d=%d",a,b,a*b); break; case'/': printf("%d/%d=%d",a,b,a/b); break; default: printf("Error"); } return 0; } I mean this that I want to execute this code again after 1 task how can I? Please guide
21st Oct 2019, 5:42 PM
SHASHANK BHANDARI
SHASHANK BHANDARI - avatar