This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int check(int num); | |
| int prime[1000000] = {2,3,5,7}; | |
| int i = 4; | |
| void buildprime(); | |
| int main() { | |
| int input = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<iostream> | |
| using namespace std; | |
| int roman_to_number( string s ){ | |
| int output = 0; | |
| for( int i = 0 ; i < s.length() ; i++){ | |
| switch( s[i] ){ | |
| case 'I': | |
| output++; | |
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| int n,score; | |
| while (scanf ("%d",&n) != EOF){ | |
| if (n >=0 && n <= 10){ | |
| score = n * 6; | |
| printf ("%d\n",score); | |
| }else if (n >= 11 && n <= 20){ | |
| score = (n-10) * 2 + 60; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main(int argc, const char * argv[]) { | |
| int n; | |
| scanf ("%d",&n); | |
| printf ("%d\n", (n - 1911)); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main(int argc, const char * argv[]) { | |
| int t; | |
| while (scanf ("%d",&t) != EOF){ | |
| printf ("%d\n",(t + 9) % 24); | |
| } | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main(int argc, const char * argv[]) { | |
| double n; | |
| scanf ("%lf",&n); | |
| printf ("%.3f\n",(n-32)*5/9); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| int n; | |
| scanf ("%d",&n); | |
| //true = 1 , false = 0 | |
| printf ("%d\n",(n > 0) - (n < 0)); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| int m; | |
| scanf ("%d",&m); | |
| printf ("%d\n",(85 - m) % 60); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| int a; | |
| scanf ("%d",&a); | |
| printf ("%d\n",(a-1)*(-1)); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| int a; | |
| scanf ("%d",&a); | |
| if (a % 2 == 1){ | |
| printf ("Odd\n"); | |
| }else{ | |
| printf ("Even\n"); | |
| } |