🔒 Closed C# winforms

Status
Not open for further replies.

anonymous_d

Established
pano po kaya yung ibabase ko yung quantity yung price na bibilin nila for example po 3 bibilin tapos fix na rin po yung price nila halimbawa po 100 so kung 3 ang bibili di bale 300 po pano po yung ganun badly needed po salamat po sa tutulong
 

Attachments

  • wow.png
    wow.png
    6.3 KB · Views: 12
gamit ka calcu jan sa loob ng form pero kung ayaw mo naman, try mo if else HAHA
{
If Quantity ="1" then
Price.text = "100"
elseif Quantity "2" then
Price.text = "200"
Endif
}
Just an example but ikaw na bahala kung ano gusto mo
Correct me if im wrong kinda kawang nako sa coding kasi nagstop na ko matagal na sa coding eh.
Madami ka pwede magamit jan like gawa ka mismo ng calcu button or if else statement.
 
I assume na yung items mo eh naka class or object siya na may price. So kunin mo lang yun then multiply mo sa quantity na kukunin mo sa textbox then ilagay mo sa text for price.
 
gamit ka calcu jan sa loob ng form pero kung ayaw mo naman, try mo if else HAHA
{
If Quantity ="1" then
Price.text = "100"
elseif Quantity "2" then
Price.text = "200"
Endif
}
Just an example but ikaw na bahala kung ano gusto mo
Correct me if im wrong kinda kawang nako sa coding kasi nagstop na ko matagal na sa coding eh.
Madami ka pwede magamit jan like gawa ka mismo ng calcu button or if else statement.

pano pag aabot ng 1mil ang quantity? edi ang haba nun? HAHAHAHA
 
pano pag aabot ng 1mil ang quantity? edi ang haba nun? HAHAHAHA
pag ganun naman, syempre hindi mo na need ng if else lol, calcu na gamitin mo. yung point ko lang naman jan sa code ko is kung hindi mo alam pano gumawa ng calcu form mag if else ka na lang. madami naman tutorial sa youtube pero kung ayaw if else lang talaga ahahahaha tiisan
 
Code:
using System;

class MainClass {
  public static void Main (string[] args) {
    Console.WriteLine ("Hello World");

    // const means constant
    const double pricePerItem = 100.50;

    // assume we are reading from a text input
    string quantity = "3";

    double finalPrice = int.Parse(quantity) * pricePerItem;

    Console.WriteLine(finalPrice);
    // prints 301.5

  }
}
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 6
    Replies
  • 516
    Views
  • 5
    Participants
Last reply from:
pixkit

Online now

Members online
623
Guests online
654
Total visitors
1,277

Forum statistics

Threads
2,276,935
Posts
28,973,174
Members
1,230,625
Latest member
heyuhe
Back
Top