Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- printf("Hello World");
- }
- =====================================
- #include <stdio.h>
- int main() {
- printf("Hello World\n");
- printf("Hello Vasya");
- }
- ======================================
- #include <stdio.h>
- int main() {
- int a = 16;
- printf("My number is %d", a);
- }
- ========================================
- #include <stdio.h>
- int main() {
- int a = 5;
- int b = 3;
- int c = a + b;
- printf("My number is %d", c);
- }
- ================================
- #include <stdio.h>
- int main() {
- int a = 5;
- int b = 3;
- int c1 = a + b;
- int c2 = a - b;
- int c3 = a * b;
- int c4 = a / b;
- int c5 = a % b;
- printf("My number is %d %d %d %d", c1, c2, c3, c4);
- }
- ========================================
- #include <stdio.h>
- int main() {
- int a, b;
- scanf_s("%d%d", &a, &b);
- int c = a + b;
- printf("%d", c);
- }
- ==========================
- #include <stdio.h>
- int main() {
- long long a, b;
- scanf("%lld%lld", &a, &b);
- printf("%lld", a);
- }
- ============================
- #include <stdio.h>
- int main() {
- double a;
- scanf("%lf", &a);
- printf("%lf", a);
- //Выведет 2 знака после запятой
- printf("%.2lf", a);
- //Выведет 5 знаков после запятой
- printf("%.5lf", a);
- //Выведет 7 знаков после запятой
- printf("%.7lf", a);
- }
- =========================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement