answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<string.h>

main(){

char Peso='P';

char Dollar='USD';

char Euro='E';

char currency[5];

float amount=0;

char currency2[5];

float equivalent;

printf("In what currency is the person's money?\n\t(P)eso\n\t(USD)ollar\n\t(E)uro\n");

scanf("%s",currency);

printf("\nWhat is the amount?\n");

scanf("%f",&amount);

printf("\nIn what currency do you want it changed?\n\t(P)eso\n\t(USD)ollar\n\t(E)uro\n");

scanf("%s",currency2);

if(strcmp(currency,"P")==0 && strcmp(currency2,"USD")==0){

equivalent=amount*0.0237;

printf("The equivalent of his money is P%.2f.\n\n",equivalent);

}

else if(strcmp(currency,"P")==0 && strcmp(currency2,"E")==0){

equivalent=amount*0.0187;

printf("The equivalent of his money is P%.2f.\n\n",equivalent);

}

else if(strcmp(currency,"USD")==0 && strcmp(currency2,"P")==0){

equivalent=amount*42.0006;

printf("The equivalent of his money is P%.0f.\n\n",equivalent);

}

else if(strcmp(currency,"USD")==0 && strcmp(currency2,"E")==0){

equivalent=amount*0.7874;

printf("The equivalent of his money is P%.2f.\n\n",equivalent);

}

else if(strcmp(currency,"E")==0 && strcmp(currency2,"P")==0){

equivalent=amount*53.4804;

printf("The equivalent of his money is P%.2f.\n\n",equivalent);

}

else if(strcmp(currency,"E")==0 && strcmp(currency2,"USD")==0){

equivalent=amount*1.27;

printf("The equivalent of his money is P%.2f.\n\n",equivalent);

}

else

printf("\nWrong Input!\n\n");

}

#include<stdio.h>

#include<string.h>

main(){

int SUV=3500;

int Car=2500;

int Motorcycle=900;

int Truck=4000;

char type[5];

char registration[5];

int ans;

printf("Please select the type of vehicle:\n\tS - SUV\n\tC - Car\n\tM - Motorcycle\n\tT - Truck\n");

scanf("%s",type);

if(strcmp(type,"S")==0 strcmp(type,"s")==0){

printf("\nIs vehicle registered on time?Y/N\n");

scanf("%s",registration);

if(strcmp(registration,"Y")==0 strcmp(registration,"y")==0){

printf("\nTotal Reaistration fee is P%d.\n\n",SUV);

}else if(strcmp(registration,"N")==0 strcmp(registration,"n")==0){

ans=(3500*0.1)+3500;

printf("\nTotal Registration fee is P%d.\n\n",ans);

}else

printf("\ninvalid!\n\n");

}else if(strcmp(type,"C")==0 strcmp(type,"c")==0){

printf("\nIs vehicle registered on time?Y/N\n");

scanf("%s",registration);

if(strcmp(registration,"Y")==0 strcmp(registration,"y")==0){

printf("\nTotal Reaistration fee is P%d.\n\n",Car);

}else if(strcmp(registration,"N")==0 strcmp(registration,"n")==0){

ans=(2500*0.1)+2500;

printf("\nTotal Registration fee is P%d.\n\n",ans);

}else

printf("\ninvalid!\n\n");

}else if(strcmp(type,"M")==0 strcmp(type,"m")==0){

printf("\nIs vehicle registered on time?Y/N\n");

scanf("%s",registration);

if(strcmp(registration,"Y")==0 strcmp(registration,"y")==0){

printf("\nTotal Reaistration fee is P%d.\n\n",Motorcycle);

}else if(strcmp(registration,"N")==0 strcmp(registration,"n")==0){

ans=(900*0.1)+900;

printf("\nTotal Registration fee is P%d.\n\n",ans);

}else

printf("\ninvalid!\n\n");

}else if(strcmp(type,"T")==0 strcmp(type,"t")==0){

printf("\nIs vehicle registered on time?Y/N\n");

scanf("%s",registration);

if(strcmp(registration,"Y")==0 strcmp(registration,"y")==0){

printf("\nTotal Registration fee is P%d.\n\n",Truck);

}else if(strcmp(registration,"N")==0 strcmp(registration,"n")==0){

ans=(4000*0.1)+4000;

printf("\nTotal Registration fee is P%d.\n\n",ans);

}else

printf("\ninvalid!\n\n");

}else

printf("\nInvalid Input!\n\n");

}

#include<stdio.h>

#include<string.h>

main(){

char status[5];

int numChildren;

int tax;

int i=1;

printf("Status of Person: S - Single\n\t\t M - Married\n\t\t H - Head of the Family\n");

scanf("%s",status);

while(i<=status){

i++;

}

if(strcmp(status,"S")==0 strcmp(status,"s")==0){

tax=20000;

printf("\nTotal Tax Exemption: P%d\n\n",tax);

}

else if(strcmp(status,"M")==0 strcmp(status,"m")==0){

printf("\nNo. of Children Under 18:\n");

scanf("%d",&numChildren);

if(numChildren>0){

tax=32000+(8000*numChildren);

printf("\nTotal Tax Exemption: P%d\n\n",tax);

}else{

tax=32000;

printf("Total Tax Exemption: P%d\n\n",tax);

}

}

else if(strcmp(status,"H")==0 strcmp(status,"h")==0){

tax=25000;

printf("Total Tax Exemption: P%d\n\n",tax);

}

else

printf("\nWrong Choice!\n\n");

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make a program that helps a money converter determine the value of a person's money in the selected currency?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

A certain number of persons selected to judge a case in court?

jury


How does a job determine a persons place in society?

it doesn't.


How do you determine how many persons a pool can safely accommodate?

50


What is the Shick test used for?

To determine a persons susceptibility to diphtheria.


Which persons photo was on the Indian currency notes before 1947?

George vi king emperor


What scale of measurement would use to determine a persons age?

ordinal


What contains the genes the determine a persons gender or sex?

The Sex chromosomes


What does the marker molecules on red blood cells determine a persons?

Blood type


What determine's a persons gender?

The sex chromosomes. XX is female and XY is male.


What does the weight and density of a persons bone structure determine?

The weight and density of a persons bone structure determines the body frame.


What makes up a persons personality?

attitude, your behavour towards something will determine what type of a person you are.


What are the means to determine compatibility between two persons?

1. Find out the fields of interests and hobbies of the two persons. If both have similar fields of interests and hobbies, they have a high degree of compatibility.2. Determine the 'Ayuvedic' constitution ('Ayurveda' is the age old Indian science of life. It is about 5000 years old, and apparently, the only science of life) of the persons concerned. And then, with the help of an experienced Ayurveda expert, one can determine the compatibility between the two persons.3. The persons concerned may mingle each other in several social, functional activities/situations and occasions and can feel whether they are compatible.