A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Fruit_shop - Stikked
From The_assassin, 6 Years ago, written in C#.
Embed
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Fruit_shop
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {          
  13.             string fruit = Console.ReadLine().ToLower();
  14.             string day = Console.ReadLine().ToLower();
  15.             double quantity = double.Parse(Console.ReadLine());
  16.             double price = 0;
  17.  
  18. if (day == "monday" || day == "tuesday" || day == "thursday"
  19.      || day == "friday"  || day == "wednesday" ) {
  20.     if (fruit == "banana")
  21.         price = 2.50 ;
  22.     else if (fruit == "apple")
  23.         price = 1.20 ;
  24.     else if (fruit == "orange")
  25.         price = 0.85 ;
  26.     else if (fruit == "grapefruit")
  27.         price = 1.45 ;
  28.     else if (fruit == "kiwi")
  29.         price = 2.70 ;
  30.     else if (fruit == "pineapple")
  31.         price = 5.50 ;
  32.     else if (fruit == "grapes")
  33.         price = 3.85;
  34. }
  35.  
  36. else if (day == "saturday" || day == "sunday") {
  37.     if (fruit == "banana")
  38.         price = 2.70 ;
  39.     else if (fruit == "apple")
  40.         price = 1.25 ;
  41.     else if (fruit == "orange")
  42.         price = 0.90 ;
  43.     else if (fruit == "grapefruit")
  44.         price = 1.60 ;
  45.     else if (fruit == "kiwi")
  46.         price = 3.00 ;
  47.     else if (fruit == "pineapple")
  48.         price = 5.60 ;
  49.     else if (fruit == "grapes")
  50.         price = 4.20;
  51. }
  52.  
  53. if (price > 0) {
  54.     Console.WriteLine("{0:F2}", price * quantity);
  55.     } else
  56.     Console.WriteLine("error");
  57.         }
  58.     }
  59. }