Click here to Skip to main content
15,913,213 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: LOGFONT structure Pin
ursus zeta21-Sep-04 14:11
ursus zeta21-Sep-04 14:11 
GeneralNewbie: Passing an object to a class Pin
jblau13-Sep-04 13:36
jblau13-Sep-04 13:36 
GeneralRe: Newbie: Passing an object to a class Pin
AnsGe13-Sep-04 19:59
AnsGe13-Sep-04 19:59 
GeneralRe: Newbie: Passing an object to a class Pin
jblau14-Sep-04 3:10
jblau14-Sep-04 3:10 
GeneralNew Games Company Requires Programers Pin
KingsZone13-Sep-04 8:34
sussKingsZone13-Sep-04 8:34 
GeneralRe: New Games Company Requires Programers Pin
Christian Graus15-Sep-04 14:24
protectorChristian Graus15-Sep-04 14:24 
GeneralRe: New Games Company Requires Programers Pin
mayowa16-Sep-04 21:10
mayowa16-Sep-04 21:10 
GeneralNewbie: Create Events and EventHandlers Pin
jblau12-Sep-04 11:01
jblau12-Sep-04 11:01 
GeneralRe: Newbie: Create Events and EventHandlers Pin
Christian Graus15-Sep-04 15:11
protectorChristian Graus15-Sep-04 15:11 
GeneralReading file from OpenFileDialog. Pin
Link260010-Sep-04 13:05
Link260010-Sep-04 13:05 
GeneralRe: Reading file from OpenFileDialog. Pin
AnsGe14-Sep-04 4:44
AnsGe14-Sep-04 4:44 
Generalwondering for some help Pin
Anonymous10-Sep-04 4:26
Anonymous10-Sep-04 4:26 
GeneralRe: wondering for some help Pin
Christian Graus15-Sep-04 14:35
protectorChristian Graus15-Sep-04 14:35 
GeneralC# to managed C++ Pin
sreejith ss nair9-Sep-04 22:50
sreejith ss nair9-Sep-04 22:50 
GeneralRe: C# to managed C++ Pin
BAIJUMAX9-Sep-04 23:54
professionalBAIJUMAX9-Sep-04 23:54 
Generalaccess control in a derived class Pin
void()9-Sep-04 13:33
void()9-Sep-04 13:33 
GeneralAn unhandled exception has occurred in your application Pin
Waleed Eissa9-Sep-04 9:46
Waleed Eissa9-Sep-04 9:46 
Generalhelp!!!!! fork program Pin
nivsah7-Sep-04 14:33
nivsah7-Sep-04 14:33 
GeneralHELP!!I code due tomorrow Pin
benibo7-Sep-04 13:52
benibo7-Sep-04 13:52 
GeneralRe: HELP!!I code due tomorrow Pin
BAIJUMAX7-Sep-04 19:32
professionalBAIJUMAX7-Sep-04 19:32 
// Written By Baiju Max
//EMail:- Baijumax@gmail.com,baijumax@yahoo.com

hi man,

enjoy coding .see below solution for u r problem.

#include "stdafx.h"

#using <mscorlib.dll>
#include <tchar.h>

using namespace System;

int _tmain(void)
{
int nMark1(0),nMark2(0),nStudentID(0),nCurrentStudentID(0);
float flAvg(0),flMaxAvg(0);
String* strGrade = new String("No Grade");

//Read The Input From The User
for ( int iIndex = 0 ; iIndex < 2 ; iIndex ++ )
{
Console::Write(S"Pl's Enter The Student ID:");
nCurrentStudentID = Int32::Parse(Console::ReadLine());

Console::Write(S"Enter The Test One Score:") ;
nMark1 = Int32::Parse(Console::ReadLine());

Console::Write(S"Enter The Test One Score:") ;
nMark2 = Int32::Parse(Console::ReadLine());

//Now Caculate Avg
flAvg = (float) (nMark1 + nMark2 )/ 2 ;

if( flMaxAvg < flAvg )
{
flMaxAvg = flAvg;
nStudentID = nCurrentStudentID;

// Now Calculate The Grade
if ( flMaxAvg >= 50 && flMaxAvg < 60 ) //D- Grade 50-59
{ strGrade = "D" ;}
else if ( flMaxAvg >= 60 && flMaxAvg < 70 ) // C- Grade 60-69
{ strGrade = "C" ;}
else if ( flMaxAvg >= 70 && flMaxAvg < 80 ) // B- Grade 70-79
{ strGrade = "B" ;}
else if ( flMaxAvg >= 80 && flMaxAvg < 90 ) // A- Grade 80-89
{ strGrade = "A" ;}
else if ( flMaxAvg >= 90 && flMaxAvg <= 100 ) // S- Grade 90-100
{ strGrade = "A" ;}
else { strGrade = "F" ; }
}
}
Console::Write(S"Student ID Is:" );
Console::Write(nStudentID.ToString());
Console::Write(S"Highest Avg is:");
Console::Write( flMaxAvg.ToString());
Console::Write(S" Grade:");
Console::Write(strGrade);

Console::ReadLine();
return 0;
}

by
baijumaxBig Grin | :-D
GeneralRe: HELP!!I code due tomorrow Pin
benibo12-Sep-04 10:35
benibo12-Sep-04 10:35 
GeneralRe: HELP!!I code due tomorrow Pin
BAIJUMAX12-Sep-04 19:35
professionalBAIJUMAX12-Sep-04 19:35 
GeneralRe: HELP!!I code due tomorrow Pin
benibo13-Sep-04 5:04
benibo13-Sep-04 5:04 
GeneralRe: HELP!!I code due tomorrow Pin
Christian Graus15-Sep-04 14:25
protectorChristian Graus15-Sep-04 14:25 
GeneralRe: HELP!!I code due tomorrow Pin
BAIJUMAX16-Sep-04 4:28
professionalBAIJUMAX16-Sep-04 4:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.