7. โปรแกรม
#include "stdio.h"
#include "math.h"
void main()
{
char pc;
float a,b,c;
int C;
{
clrscr();
printf ("Welcome To Pc-Digitaln");
printf("..........................................n");
printf ("nc = ");
scanf ("%f%f%f",&a,&b,&c);
c = (a*10+b)*pow(10,c)/1000000;
printf ("c = %0.5f uFnn",c);
printf("n.........................................n");
getch();
clrscr();
printf("****Menu***");
printf("n");
printf(" 1. pc f = ?% ");
printf("n");
printf(" 2. pc g = ?% ");
8. printf("n");
printf(" 3. pc j = ?% ");
printf("n");
printf(" 4. pc k = ?% ");
printf("n");
printf(" 5. pc l = ?% ");
printf("n");
printf(" 6. pc m = ?% ");
printf("n");
printf(" 7. pc n = ?% ");
printf("n");
printf(" 8. pc p = ?% ");
printf("n");
printf("chose 1-8 = ");
scanf ("%d",&pc);
switch(pc)
{
case (1):
printf("n pc f = +-1% ");
break;
case (2):
printf("n pc g = +-2% ");
break;
case (3):
printf("n pc j = +-5% ");
break;
case (4):
printf("n pc k = +-10%");
break;
9. case (5):
printf("n pc l = +-15%");
break;
case (6):
printf("n pc m = +-20%");
break;
case (7):
printf("n pc n = +-30%");
break;
case (8):
printf("n pc p = +-100%");
break;
}
printf("nn Thank You");
getch();
}}