Search
Notion
Drag image to reposition
Code
Example of a page showing some code blocks
#include <stdio.h> int main() { int number1, number2, sum; printf("Enter two integers: "); scanf("%d %d", &number1, &number2); sum = number1 + number2; printf("%d + %d = %d", number1, number2, sum); return 0; }
C
num1 = 1.5 num2 = 6.3 sum = float(num1) + float(num2) print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
Python
fun main(args: Array<String>) { val first: Int = 10 val second: Int = 20 val sum = first + second println("The sum is: $sum") }
Kotlin
In a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.
x2+y2=z2x^2 + y^2 = z^2