摘要: View Code 1 import java.io.IOException; 2 3 4 public class IP1 { 5 public static void main(String[] args) { 6 String str="netsh interface ipv4 set address name=本地连接 source=static addr=172.16.101.145 mask=255.255.255.0 gateway=172.16.101.254 gwmetric=0"; 7 8 try { 9 ... 阅读全文
posted @ 2012-08-19 17:12 Wheat″ 阅读(299) 评论(0) 推荐(0)
摘要: 先把字符串翻转过来,再通过sscanf函数的处理,获取A,B,C的值,再做比较,需要注意的是当输入 0+0=0 输出True 然后结束View Code 1 #include <iostream> 2 #include <cstring> 3 using namespace std; 4 char data[30]; 5 int main() 6 { 7 while (true) 8 { 9 cin >> data;10 if (strcmp(data, "0+0=0") == 0)11 {12 cout... 阅读全文
posted @ 2012-08-19 16:50 Wheat″ 阅读(219) 评论(0) 推荐(0)
摘要: 简单的字符串操作,用二维数组回旋处理输入的字符串,然后竖着输出二维字符数组toioynnkpheleaigshareconhtomesnlewx输出:| t o i o y ->|| h p k n n <-| e l e a i ->|| r a h s g <-| | e c o n h ->|| s e m o t <-|∨ n l e w x ->theresnoplacelikehomeonasnowynightxView Code 1 #include <stdio.h> 2 #include <string.h> 阅读全文
posted @ 2012-08-19 15:23 Wheat″ 阅读(140) 评论(0) 推荐(0)