🔒 Closed Patulong mga lods

Status
Not open for further replies.
Pa tulong mga lods diko makuha kung pano to ma code. Wala po kasi example input/output eh salamat po.
Nasa selection structure na po kami
Screenshot_20221023_193044.jpg
 
Sa understanding ko, need mo lang kunin yung expense. Since yun lang yung info i-assume natin na yung tax is yung magiging expense kasi yun lang yung binigay na data.

C++:
float profit;
float expenses;

if(profit >= 0 && profit <= 10000) {
    expenses = 0;
} else if (profit >= 10001 && profit <= 30000) {
    float taxrate = profit * 0.03;
    expenses = 100 + taxrate;
} else if (profit >= 30001 && profit <= 20000) {
    float taxrate = profit * 0.05;
    expenses = 200 + taxrate;
} // and so on and so forth, you get the idea.
 
Sa understanding ko, need mo lang kunin yung expense. Since yun lang yung info i-assume natin na yung tax is yung magiging expense kasi yun lang yung binigay na data.

C++:
float profit;
float expenses;

if(profit >= 0 && profit <= 10000) {
    expenses = 0;
} else if (profit >= 10001 && profit <= 30000) {
    float taxrate = profit * 0.03;
    expenses = 100 + taxrate;
} else if (profit >= 30001 && profit <= 20000) {
    float taxrate = profit * 0.05;
    expenses = 200 + taxrate;
} // and so on and so forth, you get the idea.
so yung value po na need ma input is yung profit lang po?
Sa understanding ko, need mo lang kunin yung expense. Since yun lang yung info i-assume natin na yung tax is yung magiging expense kasi yun lang yung binigay na data.

C++:
float profit;
float expenses;

if(profit >= 0 && profit <= 10000) {
    expenses = 0;
} else if (profit >= 10001 && profit <= 30000) {
    float taxrate = profit * 0.03;
    expenses = 100 + taxrate;
} else if (profit >= 30001 && profit <= 20000) {
    float taxrate = profit * 0.05;
    expenses = 200 + taxrate;
} // and so on and so forth, you get the idea.
Thanks po, ganyan talaga daw po gagawin
 
Status
Not open for further replies.

About this Thread

  • 4
    Replies
  • 729
    Views
  • 3
    Participants
Last reply from:
Frenzo125

Trending Topics

Online now

Members online
354
Guests online
1,277
Total visitors
1,631

Forum statistics

Threads
2,292,900
Posts
29,080,055
Members
1,209,577
Latest member
yasssx67
Back
Top