PROGRESS FLOW CHART
The process of project :
First Start code project
Input data declaration ex.. n1, n2
Print(“simulation of a simple calculate\n\n”);
Print (“Enter two numbers:\n”);
Scanf (“%f %f; &n1,&n2”);
Fflush(stdin);
Condition operator
Print (“Enter the operator
[+,-,*,/]\n”);
Scanf (“%c”, &oper)
And then check data operation (+ , -, *,
/)
And if true it will be calculate process
switch (oper)
{
case '+': result = n1 + n2;
break;
case '-': result = n1 - n2;
break;
case '*': result = n1 * n2;
break;
case '/': result = n1 / n2;
break;
- If fail print default
default : printf ("Error in
operation\n");
break;
}
And then show out put
do {
e = getchar();
putchar(e);
} while (e != 'e');
printf("End of program.\n");
getch();
}
e = getchar();
putchar(e);
} while (e != 'e');
printf("End of program.\n");
getch();
}
No comments:
Post a Comment