Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
YEYE 3 in 1 Instant Coffee Mix 50 Sachet
Romeshka
Updated:
Today at 12:16 AM
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Friday at 7:43 PM
NURSING , CAREGIVER , HOTEL & BEAUTY COURSES
IVA Para Medical Campus
Updated:
Thursday at 9:24 AM
Handmade Character Soft Toys Peppa Pig Family
anil1961
Updated:
Jul 1, 2026
Ad icon
Video Content Creator
pramukag
Updated:
Jun 28, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
NEED HELP..!!! C++ wikara
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Core" data-source="post: 7597596" data-attributes="member: 263471"><p><strong><a href="http://www.mediafire.com/?dilmtzzkmwn" target="_blank">http://www.mediafire.com/?dilmtzzkmwn</a></strong></p><p><strong></strong></p><p><strong>Elakiri made me typed this more than twice ,what the hell.??</strong></p><p><strong>anyway your final answer is incorrect I have done it in hand the got the answer is</strong></p><p><strong>83.375 and I have tested the above person's answer in Java and got the same result so I assume this result should be work.!!</strong></p><p><strong></strong></p><p><strong>also remember this made for C++/CLI not for CLR ,you may need to change some codes little bit if you intend to type this on CLR</strong></p><p><strong></strong></p><p><strong>I have tested 100% and fully codes I present you ,so there should not be any mistake now.!</strong></p><p><strong></strong></p><p><strong>work well on <span style="color: Red">Windows 95 to Windows 7</span> I guess but not sure since I didn't test on other OSs but I am pretty sure it should work cause I developed this work based on Windows Native Library files.</strong></p><p><strong></strong></p><p><strong><u>Notice</u></strong></p><p><strong><u>std::getline -> get the typed strings</u></strong></p><p><strong><u>::atof(); method for convert string to double</u></strong></p><p><strong></strong></p><p><strong>Need a help.? PM again.</strong></p><p><strong><img src="/styles/default/xenforo/smilies/default/wink.gif" class="smilie" loading="lazy" alt=";)" title="Wink ;)" data-shortname=";)" /> good luck.</strong></p><p><strong></strong></p><p><strong></strong></p><p><strong></strong><span style="color: DarkOliveGreen"><em>#include <string></em></span></p><p><span style="color: DarkOliveGreen"><em>#include <iostream></em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em>int main()</em></span></p><p><span style="color: DarkOliveGreen"><em>{</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "by Core for Elakiri 2010/05/06 \n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> std::string line;</em></span></p><p><span style="color: DarkOliveGreen"><em> double _num1,_num2,_num3,_num4,_answer,_answerFour,_midtest,_finaltest,finalGrade,_termPaper;</em></span></p><p><span style="color: DarkOliveGreen"><em> std::string _grade;</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> //get the values of four tests</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for test #1 \n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::getline(std::cin,line);</em></span></p><p><span style="color: DarkOliveGreen"><em> _num1 = ::atof(line.c_str());</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for test #1 :: " << _num1 << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for test #2 \n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::getline(std::cin,line);</em></span></p><p><span style="color: DarkOliveGreen"><em> _num2 = ::atof(line.c_str());</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for test #2 :: " << _num2 << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for test #3 \n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::getline(std::cin,line);</em></span></p><p><span style="color: DarkOliveGreen"><em> _num3 = ::atof(line.c_str());</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for test #3 :: " << _num3 << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for test #4 \n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::getline(std::cin,line);</em></span></p><p><span style="color: DarkOliveGreen"><em> _num4 = ::atof(line.c_str());</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for test #4 :: " << _num4 << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> _answerFour = (_num1 + _num2 + _num3 + _num4)/4; //the answer for the four tests</em></span></p><p><span style="color: DarkOliveGreen"><em> _answerFour = _answerFour*0.3;//the answer for the four tests</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "The overall mark for four tests " << _answerFour << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "as a percentage " << _answerFour << "%\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "********************************************" << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> //mid term test</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for the midterm exam \n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::getline(std::cin,line);</em></span></p><p><span style="color: DarkOliveGreen"><em> _midtest = ::atof(line.c_str());</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for the midterm exam :: " << _midtest << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em> _midtest = _midtest*0.2; //the answer for the mid term test</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for the midterm percentage :: " << _midtest << "%\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> //final exam</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for the final exam \n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::getline(std::cin,line);</em></span></p><p><span style="color: DarkOliveGreen"><em> _finaltest = ::atof(line.c_str());</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for the final exam :: " << _finaltest << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em> _finaltest = _finaltest*0.3; //the answer for the final test</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for the final percentage :: " << _finaltest << "%\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> //term paper</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for the term paper \n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::getline(std::cin,line);</em></span></p><p><span style="color: DarkOliveGreen"><em> _termPaper = ::atof(line.c_str());</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for the term paper :: " << _termPaper << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em> _termPaper = _termPaper*0.2; //the answer for the termPaper test</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Input the grade for the term paper percentage :: " << _termPaper << "%\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> //get the final mark</em></span></p><p><span style="color: DarkOliveGreen"><em> finalGrade = _answerFour + _midtest + _finaltest + _termPaper;</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Final Mark is :: " << finalGrade << "%\n";</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> if( 90 <= finalGrade && 100 >= finalGrade)</em></span></p><p><span style="color: DarkOliveGreen"><em> {</em></span></p><p><span style="color: DarkOliveGreen"><em> _grade = "A";</em></span></p><p><span style="color: DarkOliveGreen"><em> }</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> else if(87 <= finalGrade && 89 >= finalGrade)</em></span></p><p><span style="color: DarkOliveGreen"><em> {</em></span></p><p><span style="color: DarkOliveGreen"><em> _grade = "B+";</em></span></p><p><span style="color: DarkOliveGreen"><em> }</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> else if(80 <= finalGrade && 86 >= finalGrade)</em></span></p><p><span style="color: DarkOliveGreen"><em> {</em></span></p><p><span style="color: DarkOliveGreen"><em> _grade = "B";</em></span></p><p><span style="color: DarkOliveGreen"><em> }</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> else if(77 <= finalGrade && 79 >= finalGrade)</em></span></p><p><span style="color: DarkOliveGreen"><em> {</em></span></p><p><span style="color: DarkOliveGreen"><em> _grade = "C+";</em></span></p><p><span style="color: DarkOliveGreen"><em> }</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> else if(70 <= finalGrade && 76 >= finalGrade)</em></span></p><p><span style="color: DarkOliveGreen"><em> {</em></span></p><p><span style="color: DarkOliveGreen"><em> _grade = "C";</em></span></p><p><span style="color: DarkOliveGreen"><em> }</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> else if(67 <= finalGrade && 69>= finalGrade)</em></span></p><p><span style="color: DarkOliveGreen"><em> {</em></span></p><p><span style="color: DarkOliveGreen"><em> _grade = "D+";</em></span></p><p><span style="color: DarkOliveGreen"><em> }</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> else if(57 <= finalGrade && 66 >= finalGrade)</em></span></p><p><span style="color: DarkOliveGreen"><em> {</em></span></p><p><span style="color: DarkOliveGreen"><em> _grade = "D";</em></span></p><p><span style="color: DarkOliveGreen"><em> }</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> else if(0<= finalGrade && 56 >= finalGrade)</em></span></p><p><span style="color: DarkOliveGreen"><em> {</em></span></p><p><span style="color: DarkOliveGreen"><em> _grade = "F";</em></span></p><p><span style="color: DarkOliveGreen"><em> }</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> else{</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Invalid Value \n";</em></span></p><p><span style="color: DarkOliveGreen"><em> }</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Final Grade :: " << _grade << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::cout << "Press any key to exit" << "\n";</em></span></p><p><span style="color: DarkOliveGreen"><em> std::getline(std::cin,line);</em></span></p><p><span style="color: DarkOliveGreen"><em></em></span></p><p><span style="color: DarkOliveGreen"><em>}</em></span></p></blockquote><p></p>
[QUOTE="Core, post: 7597596, member: 263471"] [B][url]http://www.mediafire.com/?dilmtzzkmwn[/url] Elakiri made me typed this more than twice ,what the hell.?? anyway your final answer is incorrect I have done it in hand the got the answer is 83.375 and I have tested the above person's answer in Java and got the same result so I assume this result should be work.!! also remember this made for C++/CLI not for CLR ,you may need to change some codes little bit if you intend to type this on CLR I have tested 100% and fully codes I present you ,so there should not be any mistake now.! work well on [COLOR=Red]Windows 95 to Windows 7[/COLOR] I guess but not sure since I didn't test on other OSs but I am pretty sure it should work cause I developed this work based on Windows Native Library files. [U]Notice std::getline -> get the typed strings ::atof(); method for convert string to double[/U] Need a help.? PM again. ;) good luck. [/B][COLOR=DarkOliveGreen][I]#include <string> #include <iostream> int main() { std::cout << "by Core for Elakiri 2010/05/06 \n"; std::string line; double _num1,_num2,_num3,_num4,_answer,_answerFour,_midtest,_finaltest,finalGrade,_termPaper; std::string _grade; //get the values of four tests std::cout << "Input the grade for test #1 \n"; std::getline(std::cin,line); _num1 = ::atof(line.c_str()); std::cout << "Input the grade for test #1 :: " << _num1 << "\n"; std::cout << "Input the grade for test #2 \n"; std::getline(std::cin,line); _num2 = ::atof(line.c_str()); std::cout << "Input the grade for test #2 :: " << _num2 << "\n"; std::cout << "Input the grade for test #3 \n"; std::getline(std::cin,line); _num3 = ::atof(line.c_str()); std::cout << "Input the grade for test #3 :: " << _num3 << "\n"; std::cout << "Input the grade for test #4 \n"; std::getline(std::cin,line); _num4 = ::atof(line.c_str()); std::cout << "Input the grade for test #4 :: " << _num4 << "\n"; _answerFour = (_num1 + _num2 + _num3 + _num4)/4; //the answer for the four tests _answerFour = _answerFour*0.3;//the answer for the four tests std::cout << "The overall mark for four tests " << _answerFour << "\n"; std::cout << "as a percentage " << _answerFour << "%\n"; std::cout << "********************************************" << "\n"; //mid term test std::cout << "Input the grade for the midterm exam \n"; std::getline(std::cin,line); _midtest = ::atof(line.c_str()); std::cout << "Input the grade for the midterm exam :: " << _midtest << "\n"; _midtest = _midtest*0.2; //the answer for the mid term test std::cout << "Input the grade for the midterm percentage :: " << _midtest << "%\n"; //final exam std::cout << "Input the grade for the final exam \n"; std::getline(std::cin,line); _finaltest = ::atof(line.c_str()); std::cout << "Input the grade for the final exam :: " << _finaltest << "\n"; _finaltest = _finaltest*0.3; //the answer for the final test std::cout << "Input the grade for the final percentage :: " << _finaltest << "%\n"; //term paper std::cout << "Input the grade for the term paper \n"; std::getline(std::cin,line); _termPaper = ::atof(line.c_str()); std::cout << "Input the grade for the term paper :: " << _termPaper << "\n"; _termPaper = _termPaper*0.2; //the answer for the termPaper test std::cout << "Input the grade for the term paper percentage :: " << _termPaper << "%\n"; //get the final mark finalGrade = _answerFour + _midtest + _finaltest + _termPaper; std::cout << "Final Mark is :: " << finalGrade << "%\n"; if( 90 <= finalGrade && 100 >= finalGrade) { _grade = "A"; } else if(87 <= finalGrade && 89 >= finalGrade) { _grade = "B+"; } else if(80 <= finalGrade && 86 >= finalGrade) { _grade = "B"; } else if(77 <= finalGrade && 79 >= finalGrade) { _grade = "C+"; } else if(70 <= finalGrade && 76 >= finalGrade) { _grade = "C"; } else if(67 <= finalGrade && 69>= finalGrade) { _grade = "D+"; } else if(57 <= finalGrade && 66 >= finalGrade) { _grade = "D"; } else if(0<= finalGrade && 56 >= finalGrade) { _grade = "F"; } else{ std::cout << "Invalid Value \n"; } std::cout << "Final Grade :: " << _grade << "\n"; std::cout << "Press any key to exit" << "\n"; std::getline(std::cin,line); }[/I][/COLOR] [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom