2017-09-02 전리진 |
좋아요:0 | ||||
---|---|---|---|---|---|
작성자 | 이준호 | 등록일 | 17.09.02 | 조회수 | 101 |
23 ~ 48 23. #include int main() { int a,b; scanf ( "%d.%d" , &a, &b); printf ( "%d\n%d" , a, b); return 0; } 24. #include int main() { int i; char n[21]; scanf ( "%s" ,&n); for (i=0; n[i] != '\0' ; i++) { printf ( "\'%c\'\n" , n[i]); } return 0; } 25. #include int main() { int a, b, c, d, e; scanf ( "%1d%1d%1d%1d%1d" , &a, &b, &c, &d, &e); printf ( "[%d]\n" , a*10000); printf ( "[%d]\n" , b*1000); printf ( "[%d]\n" , c*100); printf ( "[%d]\n" , d*10); printf ( "[%d]\n" , e); return 0; } 26. #includeint main() { int a, b, c; scanf ( "%d:%d:%d" , &a, &b, &c); printf ( "%d" , b); return 0; } 27. #includeint main() { int a, b, c; scanf ( "%d.%d.%d" , &a, &b, &c); printf ( "%02d-%02d-%04d" , c, b, a); return 0; } 28. #includeint main() { long long int a; scanf ( "%lld" , &a); printf ( "%lld" , a); return 0; } 29. #includeint main() { double f; scanf ( "%lf" , &f); printf ( "%.11lf" , f); return 0; } 30. #includeint main() { long long int n; scanf ( "%lld" , &n); printf ( "%lld" , n); return 0; } 31. #includeint main() { int n; scanf ( "%d" , &n); printf ( "%o" , n); return 0; } 32. #includeint main() { int n; scanf ( "%d" , &n); printf ( "%x" , n); return 0; } 33. #includeint main() { int n; scanf ( "%d" , &n); printf ( "%X" , n); return 0; } 34. #include int main() { int n; scanf ( "%o" , &n); printf ( "%d" , n); return 0; } 35. #include int main() { int n; scanf ( "%x" , &n); printf ( "%o" , n); return 0; } 36. #include int main() { char c; scanf ( "%c" , &c); printf ( "%d" , c); return 0; } 37. #include int main() { char c; scanf ( "%d" , &c); printf ( "%c" , c); return 0; } 38. #include int main() { int a, b; scanf ( "%d%d" , &a, &b); printf ( "%d" , a+b); return 0; } 39. #include int main() { long long int n,k; scanf ( "%lld%lld" , &n, &k); printf ( "%lld" , n+k); return 0; } 40. #include int main() { int n; scanf ( "%d" , &n); printf ( "%d" , -n); return 0; } 41. include int main() { char n; scanf ( "%c" , &n); printf ( "%c" , n+1); return 0; } 42. #include int main() { int a, b; scanf ( "%d%d" , &a, &b); printf ( "%d" , a/b); return 0; } 43. #include int main() { int a, b; scanf ( "%d%d" , &a, &b); printf ( "%d" , a%b); return 0; } 44. #include int main() { long long int a; scanf ( "%lld" , &a); printf ( "%lld" , ++a); return 0; } 45 . #include int main() { int a, b; scanf ( "%d %d" , &a, &b); printf ( "%d\n" , a+b); printf ( "%d\n" , a-b); printf ( "%d\n" , a*b); printf ( "%d\n" , a/b); printf ( "%d\n" , a%b); printf ( "%.2lf" , ( double )a/b); return 0; } 46. #include int main() { int a, b, c; scanf ( "%d%d%d" , &a, &b, &c); printf ( "%d\n" , a+b+c); printf ( "%.1lf" , (a+b+c)/3.0); return 0; } 47. #include int main() { int a; scanf ( "%d" , &a); printf ( "%d\n" ,a << 1); return 0; } 48. #include int main() { int a, b; scanf ( "%d%d" , &a, &b); printf ( "%d\n" , a< return 0; } |
이전글 | 애빈벤터 |
---|---|
다음글 | 9월2일 활동 |