close
Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 投票中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 投票中 
Your small business full-time assistant

Join the 500,000+ people using Shoeboxed to streamline accounting and bookkeeping. Turn a pile of receipts into digital data to save time, money and hassle.
From our sponsors
急問請幫我用函數轉成另一個值
Oct 2nd 2013, 12:36

你只要印出來嗎?

#include <stdio.h>
#include <string.h>
using namespace std;
void print_only(char* str)
{

char* p = str;
if (*p == 'S')
{
p++;
printf("%s\n", p);
}
else if (*p == 'A')
{
char buf[100], *q = buf;
while (*p) {
*q++ = *p++;
*q++ = *p++;
*q++ = ':';
}
*--q = 0; // endl
printf("%s\n", buf);
}
else if (strcmp(p, "000BB6AABBCC") == 0)
printf("000BB6AABBCD\n");
else if (strcmp(p, "000BB6AABBCF") == 0)
printf("000BB6AABBD0\n");
else if (strcmp(p, "000BB6AABBFF") == 0)
printf("000BB6AABC00\n");
}

void main()
{
char d0 [] = "AABBCC112233";
char d1 [] = "S1234567";
char d2 [] = "000BB6AABBCC";
char d3 [] = "000BB6AABBCF";
char d4 [] = "000BB6AABBFF";
print_only(d0);
print_only(d1);
print_only(d2);
print_only(d3);
print_only(d4);
system("pause");
}

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends:

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 approa 的頭像
    approa

    2016汽車駕照的筆試 汽車筆試沒過汽車駕照筆試有效期限汽車筆試時效2015汽車駕照筆試是採用什麼方法考的?2016

    approa 發表在 痞客邦 留言(0) 人氣()