Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- char str[110];
- int main(){
- /*
- gets(str);
- char res[110];
- int j = 0;
- for(int i = 0; str[i] != '\0'; i++){
- if (str[i] != '3' && str[i] != '9'){
- res[j] = str[i];
- j++;
- }
- }
- res[j] = '\0';
- printf("%s", res);
- */
- char c = '8';
- int x = c - '0'; // ASCII - êîä 56
- printf("%d", x + 2) ;
- /*
- for(int i = 0; str[i] != '\0'; i++){
- if (str[i] != '3' && str[i] != '9'){
- printf("%c", str[i]);
- }
- }
- */
- /*
- int i = 0;
- while (str[i] != '\0'){
- i++;
- }
- // 'a' 'b' 'c' ... 'z'
- int oper = 0;
- for(int i = 0; str[i] != '\0'; i++){
- if (str[i] == '+' || str[i] == '-' || str[i] == '*'){
- oper++;
- }
- }
- if (str[0] == '-'){
- oper--;
- }
- printf("%s\n", str);
- printf("%d\n", i);
- printf("bukv u menya = %d", bukva);
- */
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement