Difference between revisions of "2023 New Spec"
(Created page with "The algorithm, represented using pseudo-code, in Figure 3 outputs a series of integers. The output depends upon the value entered by the user. '''Figure 3''' OUTPUT "Enter...") |
|||
Line 20: | Line 20: | ||
ENDWHILE | ENDWHILE | ||
OUTPUT Count | OUTPUT Count | ||
+ | |||
+ | Table 3 lists the MOD and DIV operators for your programming language. | ||
+ | |||
+ | '''Table 3''' | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Language !! MOD !! Div | ||
+ | |- | ||
+ | | C# || % || / | ||
+ | |} |
Revision as of 09:10, 11 December 2023
The algorithm, represented using pseudo-code, in Figure 3 outputs a series of integers. The output depends upon the value entered by the user.
Figure 3
OUTPUT "Enter an integer greater than 1: " INPUT Number X ← 2 Count ← 0 WHILE Number > 1 Multi ← FALSE WHILE (Number MOD X) = 0 IF NOT Multi THEN OUTPUT X ENDIF Count ← Count + 1 Multi ← TRUE Number ← Number DIV X ENDWHILE X ← X + 1 ENDWHILE OUTPUT Count
Table 3 lists the MOD and DIV operators for your programming language.
Table 3
Language | MOD | Div |
---|---|---|
C# | % | / |