Convert
1 111 100 100
Convert
110 1101 0001 1010
Convert
DIV | MOD |
---|---|
458 | X |
229 | 0 |
114 | 1 |
57 | 0 |
28 | 1 |
14 | 0 |
7 | 0 |
3 | 1 |
1 | 1 |
0 | 1 |
Convert
DIV | MOD |
---|---|
237 | X |
118 | 1 |
59 | 0 |
29 | 1 |
14 | 1 |
7 | 0 |
3 | 1 |
1 | 1 |
0 | 1 |
Convert
1 101 011
1 5 3
Convert
3 E A
11 1110 1010
1 111 101 010
1 7 5 2
Convert
DIV | MOD |
---|---|
895 | X |
111 | 7 |
13 | 7 |
1 | 5 |
0 | 1 |
Convert
DIV | MOD |
---|---|
124 | X |
62 | 0 |
31 | 0 |
15 | 1 |
7 | 1 |
3 | 1 |
1 | 1 |
0 | 1 |
Convert
DIV | MOD |
---|---|
24 | X |
12 | 0 |
6 | 0 |
3 | 1 |
1 | 1 |
0 | 1 |
Convert
DIV | MOD |
---|---|
109 | X |
54 | 1 |
27 | 0 |
13 | 1 |
6 | 1 |
3 | 0 |
1 | 1 |
0 | 1 |
Convert
DIV | MOD |
---|---|
108 | X |
54 | 0 |
27 | 0 |
13 | 1 |
6 | 1 |
3 | 0 |
1 | 1 |
0 | 1 |
Arithmetic operators: + - * / ^(power)
Range operators: < > = <= >=
read <type constraints> to <variable> - puts user input in variable
set <value> to <variable> - sets the value of a variable
if <range condition>
"<text>" - Defines a string literal
print <value> [, ...] - Prints values to screen
print new line - Moves the cursor to the start of the next line
go to <number> - Moves the flow of command to the specified instruction number
div(dividend, divisor) - takes 2 natural numbers and returns the quotient
mod(dividend, divisor) - takes 2 natural numbers and returns the remainder
abs(number) - takes an integer and returns it's absolute value
1) read real number to a
2) read real number to b
3) if a = 0
3.1) print "There are infinite solutions"
3.2) exit
4) print -1 * b/a
1) read positive integer to num
4) set 10 to previousDigit
5) if num > 0
5.1) set mod(num, 10) to digit
5.1) set div(num, 10) to num
5.2) if previousDigit <= digit
5.2.1) print "לא"
5.2.2) exit
5.3) previousDigit = digit
5.4) go to 5
6) print "כן"
1) read natural number n
2) set 1 to i
4) if i <= n
4.1) set 1 to j
4.2) if j <= n
4.2.1) print i * j
4.2.2) print space untill start of column
4.2.3) set j + 1 to j
4.2.4) go to 4.2
4.3) print new line
4.4) set i + 1 to i
4.5) go to 4
1) read natural odd number n
2) set n to i
3) if i >= -1 * n
3.1) set abs(i) to numStars
3.2) set n - numStars to numSpaces
3.3) set 0 to j
3.4) if j < numSpaces
3.4.1) print " "
3.4.3) set j + 1 to j
3.4.4) go to 3.4
3.5) set 0 to j
3.5) if j < numStars
3.5.1) print "*"
3.5.3) set j + 1 to j
3.5.4) go to 3.5
3.3) print new line
3.4) set i - 2
3.5) go to 3
/* infoprinter.cpp
* This program prints my name (Saggi Mizrahi),
* the course name (Intoduction to Computer Science) and my ID (03243124) in
* two lines
*
* Saggi Mizrahi 22 October 2013
* ---------------------------------------------------------------------------
*/
#include <iostream>
using namespace std;
int main()
{
cout << "Saggi Mizrahi, Introduction to Computer Science\n032493124\n";
return 0;
}
Saggi Mizrahi, Introduction to Computer Science
032493124