help po
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
c poHahahhh hirap niyan c++ pla.dumugo utak ko nung nag aral ako ng i.t
C po gamitAno ba specific na prog lang ang gagamitin? C, C++ or both talaga?..madali lang naman yan either sa dalawa na languages..
c po
C po gamit
haha yan ang trabaho ng IT in real life. ang maghandle ng sakit ng ulo. kaya karaniwan di tumatanda mga IT hahahaHahahhh hirap niyan c++ pla.dumugo utak ko nung nag aral ako ng i.t
#include "stdafx.h"
#include <iostream>
#include <conio.h>
using namespace std;
float get_fee_from_distance(float distance) {
float start = 1.5f;
float per_200m = 1;
float adjusted = distance - 300;
if (adjusted <= 0)
return start;
else
return start + ((int)(adjusted / 200)+1) * per_200m;
}
int main()
{
bool exit = false;
while (!exit) {
float distance = 0;
cout << "Enter distance (meters): ";
cin >> distance;
cout << "fee: " << get_fee_from_distance(distance) << endl;
while (true){
cout << "Restart? (y/n): ";
char ch = _getch();
cout << ch << endl;
if (ch == 'y' || ch == 'Y') break;
else if (ch == 'n' || ch == 'N') {
exit = true;
break;
}
}
}
}
yummyBEHOLD
Code:#include "stdafx.h" #include <iostream> #include <conio.h> using namespace std; float get_fee_from_distance(float distance) { float start = 1.5f; float per_200m = 1; float adjusted = distance - 300; if (adjusted <= 0) return start; else return start + ((int)(adjusted / 200)+1) * per_200m; } int main() { bool exit = false; while (!exit) { float distance = 0; cout << "Enter distance (meters): "; cin >> distance; cout << "fee: " << get_fee_from_distance(distance) << endl; while (true){ cout << "Restart? (y/n): "; char ch = _getch(); cout << ch << endl; if (ch == 'y' || ch == 'Y') break; else if (ch == 'n' || ch == 'N') { exit = true; break; } } } }
BEHOLD
Code:#include "stdafx.h" #include <iostream> #include <conio.h> using namespace std; float get_fee_from_distance(float distance) { float start = 1.5f; float per_200m = 1; float adjusted = distance - 300; if (adjusted <= 0) return start; else return start + ((int)(adjusted / 200)+1) * per_200m; } int main() { bool exit = false; while (!exit) { float distance = 0; cout << "Enter distance (meters): "; cin >> distance; cout << "fee: " << get_fee_from_distance(distance) << endl; while (true){ cout << "Restart? (y/n): "; char ch = _getch(); cout << ch << endl; if (ch == 'y' || ch == 'Y') break; else if (ch == 'n' || ch == 'N') { exit = true; break; } } } }
i have a problem how do i start this?
create a list of employee and save it on external life yuor program have the following menu:
(1)Add employee
(2)Edit employee
(3)Search Employee
(4)Quit
each menu item must preformits designated function..
how do start this using stream function?
sana mabigyan ito ng pansin.TIA
simple question: anong programming language ba ang gagamitin? again, be spec