Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include<fstream>
- #include<cstring>
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- char str[300];
- ifstream fin("C:\\Users\\Public\\text.txt");
- ofstream fout("C:\\Users\\Public\\index.html");
- while (!fin.eof()){
- fin >> str;
- if (strcmp(str, "Алиса") == 0){
- fout << "<img src='алиса.jpg' width='100px'/>";
- }
- else{
- if (strcmp(str, "Кролик") == 0){
- fout << "<img src='кролик.jpg' width='100px'/>";
- }
- else{
- if (strcmp(str, "нора") == 0){
- fout << "<img src='нора.jpg' width='100px'/>";
- }
- else{
- fout << str << " ";
- }
- }
- }
- }
- fin.close();
- fout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement