6648972306

6648972306



// zadanie5.2.cpp : Defines the entry point for the console application.


#include "stdafx.h"

#include <string>

#include <iostream>

#include <fstream>

using namespace std;

int porownaj(string a, string b)

i nt i;

if (a. lengthO != b.lengthO) return 0; else

{

for (i =0; i < a.length(); i++)

if (a[i] != b[i]) return 0;

}

}


}


return 1;


int porównajLustro(string a, string b) i nt i;

if (a. length() != b.lengthO) return 0; else

{

for (i =0; i < a. lengthO; i++)

if (a[i] ! = b[b. lengthO-i-1]) return 0;

}


}


return 1;


int _tmain(int argc, _tchar* argv[])

string linia; string nowe[25]; int i Te[25]; int ile_lustro[2 5]; int i;

for (i =0; i <25; i++)

{

i 1 e [i ] = 0; ile_lustro[i] = 0;

}

ifstream plik_nowe("nowe.txt"); if (plik_nowe.is_open())

i = 0;

while (getline(plik_nowe, linia))

nowe[i] = linia; i++;

}


}


plik_nowe.close();


ifstream plik_slowa("slowa.txt"); if (plik_slowa.is_open())

while (getline(plik_slowa, linia))

for (i =0; i <25; i++)

{


if (porównaj(li ni a, nowe[i])) ile [i]++;

}

if (porownajLustro(linia, nowe[i])) ile_lustro[i]++;

}


}


}


plik_slowa.close();


for (i =0; i <25; i++)

{

cout « nowe[i] «

}

return 0;


« ile[i] « " " « ile_lustro[i] «


endl




Wyszukiwarka

Podobne podstrony:
slide0586 image198 CATIA P2 Select a point or click to define the center EJ
UHAM093 76 ^ UNDERSTANDING HEADACHES AND M I G RAI N ES A good starting point for any keen reader of
Definition of ibfile set To avoid confusion, for the purposes of this discussion we define the term
święta034 envelope paper, using the last punched star as the starting point for the next link in the
zadania16 ie.♦ MITSUBISHI ^mELECTRIC Changes for the Better 4+l‘A. d C. ASZd.+n fioLs-Ą O Stern -
2 Preliminaries We define the standard Gaussian measure un on the space Cn via the formula vn(A) = 7
Obraz1 2 Zadanie 1. Radio presenter: Now it s time for the traffic news with Angela Wilson. What s
00075 (2b96bc67222a673a4490d97d7317e6 74 Hembree & Zimmer We define the actual covariance of a
00407 ?47cae0ff6dbd85a8809e0801a9c9a9 411 Process Capability: Engineering and Statistical Issues al
1.0 INTERN AL LABORATORY SCOPE 2.0    SCOPE: This procedurę is to define the Intemal
Scala PR-450U STL Antenna Smali and lightweight, the PR-450U is an ideał antenna for aural STL appli
n COMPTES RENDUS 769 preface we flnd a noble appeal, worth being ąuotcd here: “To define the co
slide0541 image820 Define the center to center Arc
slide0582 image169 [TjCATIA V5 - [Partl] g] Start TeamPDM File Edit Define the center to center dist
slide0018 image079 Morę...□ £ Defines the pr> i ) OK

więcej podobnych podstron