#include "stdio.h"
main()
{
int hp;
int acer;
int motorola;
int o2;
int nokia;
int sony;
for (hp=0;hp<5;hp++)>
printf("enter the second number:");
scanf("%d",&o2);
printf("\n");
printf("options");
printf("\n");
printf("1) addition");
printf("\n");
printf("2) subtraction");
printf("\n");
printf("3) multiplication");
printf("\n");
printf("4) division");
printf("\n");
printf("\n");
printf("enter the choice from the option:");
scanf("%d",&nokia);
if(nokia==1)
{
sony=motorola+o2;
}
if (nokia==2)
{
sony=motorola-o2;
}
if (nokia==3)
{
sony=motorola*o2;
}
if (nokia==4)
{
sony=motorola/o2;
}
printf("\n");
printf("the answer is.....: %d",sony);
printf("\n");
}
scanf("%d",&acer);
}
No comments:
Post a Comment