Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* immanuel yohanes patra (skraito) with Lord ( Jesus Christ )
- * Thank You Lord ( Jesus Christ ) for this knowledge
- * Coded in Pekanbaru at 02-SEP-2013 07:16 pm
- * Love ya all True Jesus Church, my comrade as christian
- * http://www.tjc.org
- * and lastly to our team 0x71, http://0x71.org
- * Purpose of the program :
- * Testing C++ and learning
- *
- */
- #include <iostream>
- using namespace std;
- void test (char first_strings[], char second_strings[]);
- int main () {
- /* Declaration of all variable */
- char first_string[28], second_string[28];
- cout << "==========================================";
- cout << endl << "Enter your first string to encrypt : ";
- cin.getline(first_string, 27);
- cout << "Enter your second string to encrypt : ";
- cin.getline(second_string, 27);
- cout << "result is : ";
- test(first_string,second_string);
- return 0;
- }
- void test (char first_strings[], char second_strings[]) {
- /* Declaration of variables */
- int x = 0;
- int y = 0;
- while ((first_strings[x] != '\0') || ( second_strings[y] != '\0' ))
- {
- if (first_strings[x] != '\0') {
- cout << first_strings[x];
- x++;
- }
- if (second_strings[y] != '\0') {
- cout << second_strings[y];
- y++;
- }
- }
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement