|
Знание языков
|
|
| Madcat | Дата: Пятница, 11.09.2009, 12:05 | Сообщение # 1 |
|
Удаленные
| Прочел в описании вакансии веб-дизайнера в Близзард: ПРИВЕТСТВУЕТСЯ * Знание XSL / XML * Владение другими еврорпейскими языками. оО
|
| |
| |
| Марриби | Дата: Пятница, 11.09.2009, 14:43 | Сообщение # 2 |
Новый топик? - Моя работа
Рейдер
Сообщений: 526
Статус: Offline
| Забавно.
|
| |
| |
| Realone | Дата: Пятница, 11.09.2009, 16:40 | Сообщение # 3 |
Просто флужу...
Пользователи
Сообщений: 56
Статус: Offline
| Code <?xml version="1.0" encoding="UTF-8"?> <summary amount=1 type="zadrot" fromguild="Энредж"> <message>Hello Blizzard! I wanna be a web-designer!!!111</message> </summary>
RE:
#include <stdio.h> int main(void) { char *message[] = {"Птицы ", "летят ", "на ", "Йух"}; int i; for(i = 0; i < 2; ++i) printf("%s", message[i]); printf("\n"); }
Живая - в честь Re-L 124C41 Mayer (см. аватар) - героиня лунного сериала Ergo Proxy. Ранее ник Realone. Чиппелин - сталкер черного неба. Люблю пиво портвейн, сиськи и дуракаваляние.
|
| |
| |
| Luciys | Дата: Пятница, 11.09.2009, 18:15 | Сообщение # 4 |
Пишу посты из космоса
Класс Мастер
Сообщений: 415
Статус: Offline
| ну и чо банальный C++ или # =))) можно идти к близам
You'll never leave this place... alive... 
|
| |
| |
| Марриби | Дата: Пятница, 11.09.2009, 18:31 | Сообщение # 5 |
Новый топик? - Моя работа
Рейдер
Сообщений: 526
Статус: Offline
| Помниться пару лет назад, в институте, нас насиловали.... Code # include <stdio.h> void main() { int i,i2; struct student [10] { char familia [50]; char group [10]; char predmet [3]; int resultat [10]; int num_failed; } mas[10]; printf(“Заполните формы”); for(i=0;i<10;i++) { printf(“Студент номер%d”,i+1); printf(“Введите фамилию:”); scanf(“%s”, mas[i]. familia); printf(“Введите название группы:”); scanf(“%s”, mas[i]. group); for(i2=0;i2<c;i2++) { printf(“Введите название %-й дисциплины:”,i2+1); scanf(“%s”,mas[i2].predmet[i2]); printf(“Введите оценку:”); scanf(“%d”,& mas[i].resultat[i2]); } printf(“Введите кол-во несданных экзаменов:”); scanf(“%d”,& num_failed); } printf(“Список должников:”); for(i=0;i<10;i++) {if(mas[i]. num_failed>0) { printf (“Должники отсутвуют”) } printf(“Студент: %s”, mas[i]. familia);
printf(“Группа:%s”, mas[i]. group); for(i2=0;i0<3;i2++) {printf(“%s:%d”,mas[i]. predmet[i2], mas[i]. resultat[i2]); } printf(“Кол-во несданных экзаменов: %d”, mas[i]. num_failed); }
|
| |
| |
| Марриби | Дата: Пятница, 11.09.2009, 18:37 | Сообщение # 6 |
Новый топик? - Моя работа
Рейдер
Сообщений: 526
Статус: Offline
| Си под Дос зло вселенское.... У нас еще такая тупая преподша была, если глядя ей в глаза сказать ФОРТРАН подумает что ты ее чуть ли не шлюхой обозвал Code #include <iostream.h> #include <iomanip.h> #include <fstream.h> #include <stdlib.h> #include <stdio.h>
struct Student { int num; char f[20]; char gruppa[6]; float ball; float dohod;
};
int enterChoice();
void newRecord(fstream&); void x(); void poisk(); void vuvod(ostream&, Student); void vuvod(ostream &output, Student c); void textFile(fstream&); void updateRecord(fstream&); void deleteRecord(fstream&); void outputLine(ostream&, Student);
void main()
{ fstream base("c:\\base.dat", ios::in | ios::out); if(!base) { cout<<"File error"<<endl; exit(1); } int choice; while((choice=enterChoice())!=8) { switch (choice) { case 1: newRecord(base); break; case 2: x(); break; case 3: textFile(base); break; case 4: updateRecord(base); break; case 5: deleteRecord(base); break; case 6: poisk(); break; case 7: exit(1); break; default: cout<<"Error"<<endl; break; } base.clear(); } } int enterChoice() { cout<<endl<<"Vash vibor:"<<endl <<"1 - Vvod dannuh"<<endl <<"2 - Vuvod vseh dannuh"<<endl <<"3 - Sozdanie tekstovogo faila s imenem print.txt"<<endl <<"4 - Izmenenie imeyshihsa dannuh"<<endl <<"5 - Ydalenie dannuh"<<endl <<"6 - Poisk studenta"<<endl <<"7 - Konec rabotu"<<endl;
int menuChoice; cin>>menuChoice; return menuChoice; }
void newRecord(fstream &insertInFile) { ofstream base("c:\\base.dat", ios::ate); if(!base) { cout<<"File error"<<endl; exit(1); }
cout <<"Vvedite nomer studenta. Dla ostanovki vvoda, najmite 0."<<endl; Student student; cin>>student.num; while(student.num>0 && student.num<=200) { cout <<"Vvedite Familiy, gryppy, srednii bal, dohod na odnogo chlena sem'i studenta"<<endl; cin>>student.f>>student.gruppa>>student.ball>>student.dohod; base.seekp((student.num-1)*sizeof(student)); base.write((char*)&student, sizeof(student)); cout<<"Vvedite nomer studenta. Dla ostanovki vvoda, najmite 0."<<endl; cin>>student.num; } } void outputLine(ostream&, Student); void x() {
ifstream base("c:\\base.dat", ios::in); if(!base) { cout<<"File error"<<endl; exit(1); } cout<<setiosflags(ios::left)<<setw(6)<<"Nomer"<<setw(21)<<"Familiya"<<setw(7)<<"Gryppa"<<setw(4)<<"Srednii ball"<<setiosflags(ios::right)<<setw(8)<<"Dohod na odnogo cheloveka"<<endl;
Student student;
base.read((char*)&student, sizeof(student)); while(!base.eof()) { if (student.num!=0) outputLine(cout, student); base.read((char*)&student, sizeof(Student)); } } void outputLine(ostream &output, Student c) { output<<setiosflags(ios::left)<<setw(6)<<c.num<<setw(21)<<c.f<<setw(7)<<c.gruppa<<setw(4)<<c.ball<<setw(10)<<setprecision(5)<<setiosf lags(ios::showpoint | ios::right)<<c.dohod<<endl; }
void textFile(fstream &readFromFile) { ofstream PrintFile("c:\\print.txt", ios::out);
if(!PrintFile) { cout<<"File error"<<endl; exit (1); } PrintFile<<setiosflags(ios::left)<<setw(8)<<"Nomer"<<setw(15)<<"Familiya"<<setw(10)<<"Gryppa"<<setw(15)<<"Srednii ball"<<setiosflags(ios::right)<<setw(8)<<"Dohod na odnogo cheloveka"<<endl; readFromFile.seekg(0);
Student student; readFromFile.read((char*)&student, sizeof(student));
while(!readFromFile.eof()) { if (student.num !=0) outputLine(PrintFile, student); readFromFile.read((char*) &student, sizeof (student) ); } }
void updateRecord(fstream &updateFile) { int zapis; do { cout<<"Vvedite nomer zapisi, kotorui hotite izmenit"<<endl; cin>>zapis; } while (zapis<1 || zapis>200);
Student student; updateFile.seekg((zapis - 1)*sizeof(student)); updateFile.read((char*) &student, sizeof(student));
if (student.num !=0) { outputLine (cout, student); cout<<endl<<"Vvedite yvelichenie dohoda na cheloveka so znakom (+), ymenshenie so znakom (-): "<<endl; float izmenenie; cin>>izmenenie; student.dohod +=izmenenie; updateFile.seekp((zapis - 1) *sizeof(student)); updateFile.write((char*)&student, sizeof(student)); outputLine(cout, student); } else cout<<"Zapis Nomer "<<zapis<<"Error"<<endl; }
void deleteRecord(fstream &deleteFromFile) { cout<<"Vvedite nomer scheta dla ydaleniia: "; int zapis; cin>>zapis; Student student; deleteFromFile.seekg((zapis-1)*sizeof(student)); deleteFromFile.read((char*)&student, sizeof(student)); if (student.num!=0) { Student blankStudent={0,"", "", 0};
deleteFromFile.seekp((zapis - 1)*sizeof(student)); deleteFromFile.write((char*)&blankStudent, sizeof(student)); cout<<"Zapis "<<zapis<<"bula ydalena"<<endl; } else cout<<"Zapis nomer "<<zapis<<"pysta"<<endl; }
void outputLine(ostream&, Student); void poisk() { char r[20];
ifstream base("c:\\base.dat", ios::in); if(!base) { cout<<"File error"<<endl; exit(1); } Student student;
cout<<"Vvedite familiyu stydenta"<<endl; cin>>r; cout<<setiosflags(ios::left)<<setw(6)<<"Nomer"<<setw(21)<<"Familiya"<<setw(7)<<"Gryppa"<<setw(4)<<"Srednii ball"<<setiosflags(ios::right)<<setw(8)<<"Dohod na odnogo cheloveka"<<endl; base.read((char*)&student, sizeof(student)); while(!base.eof()) if (r==student.f)
outputLine(cout, student); base.read((char*)&student, sizeof(Student)); } Даж работы какие то сохранились с 1 курса....
Сообщение отредактировал Марриби - Пятница, 11.09.2009, 18:39 |
| |
| |
| Luciys | Дата: Пятница, 11.09.2009, 19:42 | Сообщение # 7 |
Пишу посты из космоса
Класс Мастер
Сообщений: 415
Статус: Offline
| уаахахах
You'll never leave this place... alive... 
|
| |
| |