Postfix starter code: C - copy into a file called postfix.c #include #include int main() { int a, b; char expr; scanf("%d %d %c", &a, &b, &expr); if (expr=='+') { printf("%d", a+b); } } C# - copy into a file called postfix.cs using System; public class postfix { public static void Main() { string[] elements; // Read a single line from standard in, and store the contests in a list elements = Console.ReadLine().Split(' '); // If the third element (remember that counting starts at 0) is a '+'-symbol // Add the first two elements, and output those. if (elements[2]=="+") { Console.WriteLine(Int32.Parse(elements[0])+Int32.Parse(elements[1])); } } } C++ - copy into a file called postfix.cpp #include #include using namespace std; int main() { int a, b; string expr; cin >> a >> b >> expr; if (expr=="+") { cout << a+b; } } Haskell - copy into a file called postfix.hs main :: IO () main = interact ((++ "\n") . show . eval . words) where eval :: [String] -> Int eval [x, y, "+"] = read x + read y Java - copy into a file called postfix.java import java.util.Scanner; class postfix { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); String op = scanner.next(); if(op.equals("+")) { System.out.println(a + b); } } } Javascript - copy into a file called postfix.js #!/usr/bin/env node 'use strict'; const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question('', (answer) => { // Answer Logic goes here: let values = answer.split(' '); if (values[2] === '+') { console.log(Number(values[0]) + Number(values[1])); }; rl.close(); }); Kotlin - copy into a file called postfix.kt fun main(args : Array) { val (a, b, op) = readLine()!!.split(' ') when(op) { "+" -> println(a.toInt() + b.toInt()) } } Pascal - copy into a file called postfix.pas program postfix; uses sysutils; var a, b: integer; c: string; begin readln(a, b, c); c := Trim(c); if c='+' then begin writeln(a+b); end; end. Python - copy into a file called postfix.py inputs = input().split() a = int(inputs[0]) b = int(inputs[1]) operator = inputs[2] if operator == "+": print(a + b) Ruby - copy into a file called postfix.rb line = gets parts = line.split ( " " ) if parts[2] == '+' puts parts[0].to_i + parts[1].to_i; end Visual Basic - copy into a file called postfix.vb Module Postfix Sub Main() Dim Inputargs() As String Dim Answer As Integer Inputargs = Console.ReadLine().Split(" ") If Inputargs(2) = "+" Then Answer = Int(Inputargs(0)) + Int(Inputargs(1)) End If Console.WriteLine(Answer) End Sub End Module