Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- /* run this program using the console pauser or add your own getch, system("pause") or input loop */
- using namespace std;
- int main(int argc, char** argv) {
- string table[100];
- table[100] = argv[1];
- int z;
- int i;
- for(i=0; i<100; i++)
- {
- if(table[i] == ",")
- {
- z = i;
- }
- }
- int tab1[z]; //wielkosc tabelki do przecinka
- int tab2[i-z]; //wielkosc tabelki od przcinka do konca i (100)
- ofstream OUT;
- OUT.open("liczby.txt" , ios::out);
- for(int s=0; s<100; s++)
- {
- for(int j=0; j<100; j++)
- {
- if( tab1[j] == tab2[s])
- {
- OUT<< tab1[s];
- s++; // zeby liczby sie nie potwaraly????????????
- }
- }
- }
- OUT.close(); //poprawnie?
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment