Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <locale.h> // здесь "живёт" setlocale(LC_ALL, "rus");
- int n = 1,
- n2 = 8;
- char sz[35] = "SONY";
- ///////////////////////////////////////////
- int main()
- {
- sz[1] = 'N';
- printf("%s\n", sz );
- printf("%d\n", sz );
- printf("%d\n", &sz[0]);
- for(int i = 1; i < 35; i++)
- {
- printf("address sz[%2d] = %d\n", i, &sz[i]);
- }
- return 0;
- }
- /*
- #include <stdio.h>
- #include <locale.h>
- float y, // jhdfsjghdkjgh
- x; // fdkljdfklj
- char i = '+';
- ////////////////////////////////////////////////////
- int main()
- {
- setlocale(LC_ALL, "Russian");
- float y,
- x;
- printf("Address local f = %d\n", &y);
- return 0;
- char i= '+';
- while(i != '0')
- {
- printf("<< - + / * >> Введите символ: ");
- scanf("%c%*c", &i);
- if(i == '0') { return 0; break;}
- if(i == '-' || '+' || '/'|| '*'){
- printf("Введите число: ");
- scanf("%f%*c", &y);
- printf("Введите число: ");
- scanf("%f%*c", &x);
- switch(i)
- {
- case '-': printf("%.4f\n", y - x);
- break;
- case '+': printf("%.4f\n", y + x);
- break;
- case '*': printf("%.4f\n", y * x);
- break;
- case '/': if (y != 0) printf("%.4f\n", y / x);
- else printf("Деление на ноль!!!!\n");
- }
- }
- else printf("Неверный символ\n ");
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement