Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi Sir, help to solve this structure programming question. And also please provi

ID: 1766158 • Letter: H

Question

Hi Sir,
help to solve this structure programming question. And also please provided clearly written and help to ensure no error occured during run programming.
thanks.

Question1 1. Write a program to calculate the water rates according to the table below: http://www.span.gov.mylpdf/Water Tariff 2015.pdf An example of the output interface (based on the domestic rates in Penang state): Prepared by Name and ID: 45678 Class: 4SPG1 This program calculates the monthly water bill for you. Please key in the water consumption for this month (in mA3): -10 Wrong! Can't be negative value! Key in again! Please key in the water consumption for this month (in mA3): 10 You need to pay for RM 2.50 for this month Thanks for using my program. Press any key to continue. 2 Suppose hat you are enied wit edtr credit card Every time before you want to swipe your card, you must check to ensure that the current total amount does not exceed your credit limit. If it exceeds, you should stop using the credit card for this particular month. Write a pseudo code to illustrate this scenario.

Explanation / Answer

I will write program in c language.

if you find any error please comment me i correct it

i write this program in c language you can comile this in dovc compiler.

if(a<0)

printf("water consumption never be in negative , please enter positive water consumption");

else

{

b=a*0.25;

if(b>1200)

printf("you are unable to use your credit card");

else

{

printf("youe total amount: %d",&b);

printf("thanks for using program");

}

}

2 answer:-

#include<stdio.h>

int main()

{

int a;

printf("please read the amount");

scanf("%d",&a);

if(a>12000)

printf("card is not accepted for this month");

else

printf("you can use your card for this month")

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote