Oceny
Ostatnio zmodyfikowano 2009-05-02 13:58
mms1994 Temat założony przez niniejszego użytkownika |
» 2009-04-24 16:34:49 Może inaczej sformułuje pytanie, co zrobić aby c++ obsługiwał '%', jaką bibliotekę czy co?? |
|
steckel |
» 2009-04-24 16:51:37 cout << zmiennaTypuDouble * 100 << "%";
O to ci chodzi? |
|
mms1994 Temat założony przez niniejszego użytkownika |
» 2009-04-24 17:58:57 nie, oto: if( 39 %* full )... |
|
steckel |
» 2009-04-24 18:39:04 |
|
mms1994 Temat założony przez niniejszego użytkownika |
» 2009-04-24 18:44:58 Nadal tylko 1 wyskakuje: #include <conio.h> #include <iostream>
int main() { using namespace std; double a, b, c, d, e, punkty, full; cout << "Podaj maksymalna liczbe punktow: " << endl; cin >> full; cout << "Podaj liczbe punktow zdobytych przez ucznia: " << endl; cin >> punkty; e = punkty / full; c = e / 0.1; if( c <= 0.39 * full ) if( c <= 0.39 * full ) d = 1; else( c <= 0.39 * full ); if( 0.40 * full <= c && c <= 0.48 * full ) if( 0.40 * full <= c && c <= 0.48 * full ) d = 2; else( 0.40 * full <= c && c <= 0.48 * full ); if( 0.49 * full <= c && c <= 0.56 * full ) if( 0.49 * full <= c && c <= 0.56 * full ) d = 2.5; else( 0.49 * full <= c && c <= 0.56 * full ); if( 0.57 * full <= c && c <= 0.64 * full ) if( 0.57 * full <= c && c <= 0.64 * full ) d = 3; else( 0.57 * full <= c && c <= 0.64 * full ); if( 0.65 * full <= c && c <= 0.72 * full ) if( 0.65 * full <= c && c <= 0.72 * full ) d = 3.5; else( 0.65 * full <= c && c <= 0.72 * full ); if( 0.73 * full <= c && c <= 0.80 * full ) if( 0.73 * full <= c && c <= 0.80 * full ) d = 4; else( 0.73 * full <= c && c <= 0.80 * full ); if( 0.81 * full <= c && c <= 0.88 * full ) if( 0.81 * full <= c && c <= 0.88 * full ) d = 4.5; else( 0.81 * full <= c && c <= 0.88 * full ); if( 0.89 * full <= c && c <= 0.96 * full ) if( 0.89 * full <= c && c <= 0.96 * full ) d = 5; else( 0.89 * full <= c && c <= 0.96 * full ); if( 0.97 * full <= c && c <= full ) if( 0.97 * full <= c && c <= full ) d = 5.5; else( 0.97 * full <= c && c <= full ); if( full < c ) if( full < c ) d = 6; cout << "Ocena to: " << d << "\n" << e * 100 << "%" << endl; getch(); return( 0 ); }
|
|
DejaVu |
» 2009-04-24 21:10:03 Nie chce mi się więcej pisać podpowiedzi - w programie jest za dużo błędów. Poniżej zamieszczam rozwiązanie. #include <conio.h> #include <iostream>
int main() { using namespace std; double a, b, c, d, punkty, full; cout << "Podaj maksymalna liczbe punktow: " << endl; cin >> full; cout << "Podaj liczbe punktow zdobytych przez ucznia: " << endl; cin >> punkty; c = punkty / full; if( punkty <= 0.39 * full ) d = 1.0; else if( punkty <= 0.48 * full ) d = 2.0; else if( punkty <= 0.56 * full ) d = 2.5; else if( punkty <= 0.72 * full ) d = 3.5; else if( punkty <= 0.80 * full ) d = 4.0; else if( punkty <= 0.88 * full ) d = 4.5; else if( punkty <= 0.96 * full ) d = 5.0; else if( punkty <= full ) d = 5.5; else d = 6.0; cout << "Ocena to: " << d << "\n" << c * 100 << "%" << endl; getch(); return( 0 ); }
|
|
mms1994 Temat założony przez niniejszego użytkownika |
» 2009-04-25 08:38:31 Bardzo dziękuję za pomoc :), mam tylko jeszcze jedno pytanie, co oprócz 'if' można użyć aby jeśli ocena>0 robi, mniejsza zamyka?? |
|
GoldWolf |
» 2009-05-02 13:58:18 Żeby nie drażnić admina można zamknąć ;-). |
|
1 « 2 » |