🔒 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
  • 724
    Views
  • 3
    Participants
Last reply from:
Frenzo125

Online now

Members online
1,017
Guests online
789
Total visitors
1,806

Forum statistics

Threads
2,275,582
Posts
28,964,240
Members
1,231,872
Latest member
yannahhh
Back
Top