🔒 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.

Similar threads

About this Thread

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

Trending Topics

Online now

Members online
1,158
Guests online
3,168
Total visitors
4,326

Forum statistics

Threads
2,331,821
Posts
29,260,568
Members
1,147,835
Latest member
shsjsjkssksn
Back
Top