How do you Write a C program for performing as calculator?

1 answer

Answer

1283338

2026-04-30 03:10

+ Follow

#include<stdio.h>

#include<conio.h>

void tax caluclation()

{

char name[20];

double sal,tax;

clrscr();

printf("enter the name of the person:\n");

scanf("%s",name);

printf("enter the name of the person:\n");

scanf("%lf",sal);

if(sal<=75000)

tax=sal*12.0/100;

else

tax=sal*16.0/100;

printf("the tax amount for %s is:%lf\n",name,tax);

}

void main()

{

tax caluclation();

}

no space b/w (tax caluclation) taxcaluclation

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.