zoukankan      html  css  js  c++  java
  • 字符串函数

     1 #include <cstdio>
     2 #include <iostream>
     3 #include <algorithm>
     4 #include <cstring>
     5 #define f(x) x*x*x
     6 using namespace std;
     7 char  s[10],p[10];
     8 int  main()
     9 {
    10     scanf("%s%s",s,p);
    11     /*
    12     strcat(s,p);
    13     printf("%s
    %s
    ",s,p);
    14     wegfr
    15     wgtr
    16     wegfrwgtr
    17     wgtr
    18     */
    19     /*
    20     strcpy(s,p);
    21     printf("%s
    %s
    ",s,p);
    22     affer
    23     e
    24     e
    25     e
    26    */
    27    if(strcmp(s,p)==0){
    28        printf("0
    ");
    29        /*
    30        wert
    31       wert
    32       0
    33 */
    34    }
    35    else if(strcmp(s,p)>0){
    36        printf("1
    ");
    37        /*
    38        wert
    39        ascd
    40        1
    41 */
    42    }
    43    else{
    44        printf("-1
    ");
    45       // egfwtg
    46       //ewfr
    47       //-1
    48    }
    49 }
  • 相关阅读:
    活动安排
    中国剩余定理
    欧拉回路
    单词游戏
    Ant Trip
    John's Trip
    太鼓达人
    相框
    原始生物
    Blockade
  • 原文地址:https://www.cnblogs.com/tingtin/p/9965855.html
Copyright © 2011-2022 走看看