Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //TASK 1
- #include <stdio.h>
- int main()
- {
- char O[] = "OOOOOOOO";
- printf("%s", O);
- printf("\nO OO O\nO O O O\nOO OO\nOO OO\nO O O O\nO OO O \n%s", O);
- getchar();
- return 0;
- }
- //TASK 2
- #include <stdio.h>
- int main()
- {
- int a = 0177176;
- unsigned long b = 9613;
- char c[] = "abcdef";
- long d = 0xffffabdf;
- printf("\ta=%+-*.7u\tb=%+-*.01x c=%.4s d=%-*.8li", 12, a, 10, b, c, 16, d);
- getchar();
- return 0;
- }
- //TASK 3
- #include <stdio.h>
- #include <windows.h>
- int main()
- {
- double a;
- char b;
- long double c;
- unsigned long d;
- scanf_s("%131E;%c;%10Lf %6lu", &a, &b, &c, &d);
- printf("a=%E\nb=%c\nc=%Lf\nd=%lu\n",a, b, c, d);
- system("pause"); //Input Data: 4.182632E+01;*;12.836329 256893
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement