คำเตือน !!

เนื่องจากว่ากำลังจะเปลื่ยน blog ของผมให้ เป็นเน้นที่สนับสนุน FireFox นะครับ
ดังนั้นจึง ถึงโอกาศนี้ในการเปลื่ยนรูปแบบ บล๊อกทั้งหมดเลยครับ

ยังไงก็ถ้าท่านใดยังที่สนใจ แล้วต้องการ บันทึกข้อความหรือรูปภาพในบล๊อกนี้
ก็แนะนำให้ บันทึกก่อนเลยนะครับ เพราะอาจจะลบออกหมด ทุกอย่างเลย

>[]<

ขออภัยในความไม่สะดวกครับ

ถ้าเห็นรูป ภายในบล๊อกแปลกๆ ไป ก็ไม่ต้องตกใจนะครับผม

Comment



smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry

แวะมาเยี่ยมอีกแล้วล่ะ question

#1 By Op (125.24.237.87) on 2008-07-08 20:22

#include<iostream>
#include<iomanip>
using std :: endl;
using std :: cout;
using std :: cin;

void printCharsAtOdd(const char*);
void printNonVowels(const char*);

int main()
{
char c01[10] = {'P', 'r', 'i', 'n', 'c', 'e', 's', 's','Z', '\0'};
char *cPtr = c01;
char c03;
int i02 = 0, i03 = 1;

cout << *(c01 + 1);
c03 = *(c01 + 2);
cout << c03;

printCharsAtOdd(cPtr);


system("PAUSE");
return 0;
}

void printCharsAtOdd(const char *ch1)
{
int i02=0, i03 = 1;

while(ch1[i02] != '\0')
{
cout << *(ch1 + (i02+1));
++i02;
++i03;
}
cout << i03;

/*static int i01 = 3;
if ((i01%2) == 0)*/
cout << *(ch1+3);

}

void printNonVowels(const char *)
{
}

#2 By pe 15 (168.120.9.229) on 2008-07-10 12:56

#include <iostream>
#include <string>
using namespace std;

void printCharsAtOdd (const char *);
void printNonVowels (const char *);

int main () {
char string1[] = "Hello World";
cout << "The example of sentence is " << string1 << "." << endl;
printCharsAtOdd(string1);
printNonVowels(string1);

system ("pause");
return 0;
}

void printCharsAtOdd (const char *text){
cout << "The result when the odd positions are selected only is ";
for (int i=0; *text!='\0' ; i++ ,text++ ){

if (i%2==0){
cout << "";
}else{
cout << *text;
}
}
cout << "." << endl;
}

void printNonVowels (const char *text){

cout << "The result when all vowels are cut out is ";
for (int i=0; *text!='\0' ; i++ ,text++ ){

if (*text != 'A' && *text != 'a' && *text != 'E' && *text != 'e' && *text != 'I' && *text != 'i' && *text != 'O' && *text != 'o' && *text != 'U' && *text != 'u'){
cout << *text;
}else{
cout << "";
}
}
cout << "." << endl;

}



#3 By 12 (168.120.9.228) on 2008-07-10 13:01