Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #define size 20
- using namespace std;
- void wypisz(char** t, int ilosc) {
- for (int j = 0; j < ilosc; j++) {
- for (int i = 0; t[j][i] != NULL; i++) {
- if (i % 2 == 0) cout << t[j][i]<<", ";
- }
- cout << endl;
- }
- }
- void tworz(char** t,int ile) {
- for (int k = 0; k < ile; k++){
- t[k] = new char[size];
- }
- }
- void wprowadz(char** t,int ile) {
- for (int j = 0; j < ile; j++){
- cin >> t[j];
- }
- }
- int main()
- {
- char **t;
- t = new char*[size];
- int ile;
- cin >> ile;
- tworz(t, ile);
- wprowadz(t, ile);
- wypisz(t,ile);
- delete[]t;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement