Advertisement
gabbyshimoni

Example 001 - print to screen

Sep 26th, 2016
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. /*
  2.    תוכנית זו מחשבת ומדפיסה למסך את המחיר של פריט לאחר הנחה של
  3.    20%
  4.  
  5. */
  6. void setup() {
  7.   int originalPrice = 350;
  8.   int discount = 20;
  9.   int finalPrice;
  10.  
  11.   finalPrice = originalPrice * (100 - discount) / 100;
  12.   Serial.begin(9600);
  13.   Serial.print("Original Price is:");
  14.   Serial.println(originalPrice);
  15.   Serial.print("Discounted Price is:");
  16.   Serial.println(finalPrice);
  17. }
  18.  
  19. void loop() {
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement