Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
FREE SEO Check & Google Maps Check for Sri Lankan Businesses | Web Design, Website Price Rs 14,900 |
LankaSolve
Updated:
Oct 20, 2026
ඕනම රටකට සෙට් වෙන CV එකක්
ErMurazor
Updated:
Oct 17, 2026
Hambantota
7 Acres Beachfront Land For Sell DownSouth , PerPerch Price 420 000
1024 Digital
Updated:
Oct 14, 2026
Baseus PI LITE INDOOR CAMERA
ErMurazor
Updated:
Oct 12, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
Need help in a Java Coding
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Ranhiru" data-source="post: 3977433" data-attributes="member: 17748"><p>Its really easy machan...</p><p>what you need to do is first take the input. (how many products) I hope you know how to take the input from the user.</p><p></p><p>Then keep a variable for the final price...</p><p></p><p>then keep on testing for conditions</p><p></p><p>if (value=>100)</p><p> finalprice=value*0.2 //50%;</p><p>else if ( (value=>50) && (value=<99)</p><p> finalprice=value*0.4 //40%</p><p></p><p>like this machan construct the whole if else structure and finally print the final value <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></p><p></p><p>Hope this helps...</p><p></p><p>Machan and if you wanna learn machan dont ask anyone 2 write the full code. </p><p>Write your own code and paste it here and the people can see if its right or if its wrong can point out where u went wrong...</p><p></p><p>gud luck</p></blockquote><p></p>
[QUOTE="Ranhiru, post: 3977433, member: 17748"] Its really easy machan... what you need to do is first take the input. (how many products) I hope you know how to take the input from the user. Then keep a variable for the final price... then keep on testing for conditions if (value=>100) finalprice=value*0.2 //50%; else if ( (value=>50) && (value=<99) finalprice=value*0.4 //40% like this machan construct the whole if else structure and finally print the final value :) Hope this helps... Machan and if you wanna learn machan dont ask anyone 2 write the full code. Write your own code and paste it here and the people can see if its right or if its wrong can point out where u went wrong... gud luck [/QUOTE]
Insert quotes…
Verification
Payakata winadi keeyak tibeda?
Post reply
Top
Bottom