- Ја почнал/а темата
- #1
Lightlord
Intern
- 6 април 2007
- 86
- 1
Ај ако може малку помош ми треба овоа го правев во Visual Studio 6 од 1997 година и сега го претворив во 2005ка и не ми работи програмов. Да не знае некој што да додадам? Или има многу разлики па треба од почеток да го правам?
Код:
//Programa za pravenje na tabeli
#include <iostream>
void main()
{
char colon1[60]; //
char colon2[60]; //
char colon3[60]; //Iminjata na kolonite
char colon4[60]; //
int colon1_1; //Promenlivi za prvata kolona
int colon1_2;
int colon1_3;
int colon1_4;
int colon2_1; //Promenlivi za vtorata kolona
int colon2_2;
int colon2_3;
int colon2_4;
int colon3_1; //Promenlivi za tretata kolona
int colon3_2;
int colon3_3;
int colon3_4;
int colon4_1; //Promenlivi za cetvrtata kolona
int colon4_2;
int colon4_3;
int colon4_4;
//Definiranje na iminjata za kolonite
cout << "Please insert name for the first colon:" << "\n"; //Definiranje ime za prvata kolona
cin >> colon1;
cout << "The first colon will be named" << ' ' << colon1 << endl << endl;
cout << "Please insert name for the second colon:" << "\n"; //Definiranje ime za vtorata kolona
cin >> colon2;
cout << "The first colon will be named" << ' ' << colon2 << endl << endl;
cout << "Please insert name for the third colon:" << "\n"; //Definiranje ime za tretata kolona
cin >> colon3;
cout << "The third colon will be named" << ' ' << colon3 << endl << endl;
cout << "Please insert name for the fourth colon:" << "\n"; //Definiranje ime za cetvrtata kolona
cin >> colon4;
cout << "The third colon will be named" << ' ' << colon4 << endl << endl;
//Defining value for first colon
cout << "Please insert the first value for the first colon:" << "\n"; //Definiranje na prvata vrednost za prvata kolona
cin >> colon1_1;
cout << "The first value for the first colon will be" << ' ' << colon1_1 << endl;
cout << "Please insert the second value for the first colon:" << "\n"; //Definiranje na vtorata vrednost za prvata kolona
cin >> colon1_2;
cout << "The second value for the first colon will be" << ' ' << colon1_2 << endl;
cout << "Please insert the third value for the first colon:" << "\n"; //Definiranje na tretata vrednost za prvata kolona
cin >> colon1_3;
cout << "The first value for the first colon will be" << ' ' << colon1_3 << endl;
cout << "Please insert the fourth value for the first colon:" << "\n"; //Definiranje na cetvrtata vrednost za prvata kolona
cin >> colon1_4;
cout << "The first value for the first colon will be" << ' ' << colon1_4 << endl;
cout << "The values for the first colon have been defined" << endl << endl;
//Defining values for the second colon
cout << "Please insert the first value for the second colon:" << "\n"; //Definiranje na prvata vrednost za vtorata kolona
cin >> colon2_1;
cout << "The first value for the first colon will be" << ' ' << colon2_1 << endl;
cout << "Please insert the second value for the second colon:" << "\n"; //Definiranje na vtorata vrednost za vtorata kolona
cin >> colon2_2;
cout << "The second value for the first colon will be" << ' ' << colon2_2 << endl;
cout << "Please insert the third value for the second colon:" << "\n"; //Definiranje na tretata vrednost za vtorata kolona
cin >> colon2_3;
cout << "The first value for the first colon will be" << ' ' << colon2_3 << endl;
cout << "Please insert the fourth value for the second colon:" << "\n"; //Definiranje na cetvrtata vrednost za vtorata kolona
cin >> colon2_4;
cout << "The first value for the first colon will be" << ' ' << colon2_4 << endl;
cout << "The values for the first colon have been defined" << endl << endl;
//Defining values for the third colon
cout << "Please insert the first value for the third colon:" << "\n"; //Definiranje na prvata vrednost za tretata kolona
cin >> colon3_1;
cout << "The first value for the first colon will be" << ' ' << colon3_1 << endl;
cout << "Please insert the second value for the third colon:" << "\n"; //Definiranje na vtorata vrednost za tretata kolona
cin >> colon3_2;
cout << "The first value for the first colon will be" << ' ' << colon3_2 << endl;
cout << "Please insert the third value for the third colon:" << "\n"; //Definiranje na tretata vrednost za tretata kolona
cin >> colon3_3;
cout << "The first value for the first colon will be" << ' ' << colon3_3 << ' ' << endl;
cout << "Please insert the first value for the third colon:" << "\n"; //Definiranje na cetvrtata vrednost za tretata kolona
cin >> colon3_4;
cout << "The first value for the first colon will be" << ' ' << colon3_4 << ' ' << endl;
cout << "The values for the first colon have been defined" << endl << endl;
//Defining values for the fourth colon
cout << "Please insert the first value for the fourth colon:" << "\n"; //Definiranje na prvata vrednost za cetvrtata kolona
cin >> colon4_1;
cout << "The first value for the first colon will be" << ' ' << colon4_1 << endl;
cout << "Please insert the second value for the fourth colon:" << "\n"; //Definiranje na vtorata vrednost za cetvrtata kolona
cin >> colon4_2;
cout << "The first value for the first colon will be" << ' ' << colon4_2 << endl;
cout << "Please insert the third value for the fourth colon:" << "\n"; //Definiranje na tretata vrednost za cetvrtata kolona
cin >> colon4_3;
cout << "The third value for the first colon will be" << ' ' << colon4_3 << endl;
cout << "Please insert the fourth value for the fourth colon:" << "\n"; //Definiranje na cetvrtata vrednost za cetvrtata kolona
cin >> colon4_4;
cout << "The first value for the first colon will be" << ' ' << colon4_4 << endl;
cout << "The values for the first colon have been defined" << endl << endl;
cout << "Printing..." << "\n" << endl;
//Ispisuvanje na tabelata
cout.width(10); cout << colon1; //Pisuvanje na iminjata na kolonite
cout.width(10); cout << colon2; //
cout.width(10); cout << colon3; //
cout.width(10); cout << colon4 << endl << endl; //
cout.width(10); cout << colon1_1; //Pisuvanje na vrednostite na prvata kolona
cout.width(10); cout << colon1_2; //
cout.width(10); cout << colon1_3; //
cout.width(10); cout << colon1_4 << endl; //
cout.width(10); cout << colon2_1; //Pisuvanje na vrednostite na vtorata kolona
cout.width(10); cout << colon2_2; //
cout.width(10); cout << colon2_3; //
cout.width(10); cout << colon2_4 << endl; //
cout.width(10); cout << colon3_1; //Pisuvanje na vrednostite na tretata kolona
cout.width(10); cout << colon3_2; //
cout.width(10); cout << colon3_3; //
cout.width(10); cout << colon3_4 << endl; //
cout.width(10); cout << colon4_1; //Pisuvanje na vrednostite na cetvrtata kolona
cout.width(10); cout << colon4_2; //
cout.width(10); cout << colon4_3; //
cout.width(10); cout << colon4_4 << endl <<endl; //
return;
}