- #1
Omid
- 182
- 0
I've compiled this code in linux by using g++. I also need to compile it bye Turbo C++ (I have version 4.5 of that).
I tried to compile it but there were lots of errors. I tried the documentation and followed the instructions but some errors still exist.
Is there somebody to revise the code to it's TC++ compatile form for me?
(The program is stupidly simple, it just takes your name and your marks in some lessons and prints out the average and your name on the screen. The texts it shows, are in Pinglish. Persian language written by English alphabets)
I tried to compile it but there were lots of errors. I tried the documentation and followed the instructions but some errors still exist.
Is there somebody to revise the code to it's TC++ compatile form for me?
(The program is stupidly simple, it just takes your name and your marks in some lessons and prints out the average and your name on the screen. The texts it shows, are in Pinglish. Persian language written by English alphabets)
PHP:
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
#include <string>
using std::string;
int main()
{
std::cout << "Be name khoda \n Lotfan Name Daneshjoo ra vared konid:\n";
string daneshjoo_name;
std::cin >> daneshjoo_name;
std::cout << "Nomreie darse physic:";
double phyz_num;
std::cin >> phyz_num;
std::cout << "Nomreie Riazi:";
double riazi;
std::cin >> riazi;
std::cout << "Nomreie Computer:";
double computer;
std::cin >> computer;
std::cout << "Nomreie Arabi:";
double arabi;
std::cin >> arabi;
std::cout << "Nomreie difransiel:";
double difransiel;
std::cin >> difransiel;
double moadel;
moadel = (arabi+computer+riazi+phyz_num+difransiel)/5;
std::cout << "\n\n Moadele in daneshjoo:";
std::cout << moadel;
std::cout << "\n";
std::cout << daneshjoo_name;
std::cout << " ba tavajoh be moadel, daneshjooye";
if(moadel<=12)
{
std::cout << " mashroot \n";
}
if(12<moadel&& moadel<17)
{
std::cout << " mamooli \n";
}
if(moadel>=17)
{
std::cout << " momtaz \n";
}
return 0;
}