main
#import <Foundation/Foundation.h>
void btechMarks(NSString *stuName,int english,int ELCS,int EW,int M1,int MM,int EP,int EC,int CPDS,int ED,int CPL,int EPL,int M3,int PTSP,int ES,int ECir,int EDC,int SS, int EDCLab,int BSLab,int PEE,int ECA,int PDC,int STLD,int EMTL,int EELab,int ECALab,int PDCLab,int CS,int CO,int AWP, int EMI,int AC,int IC,int ACLab,int ICLab,int MEFA,int AECS,int OS,int DC,int MPMC,int DSP,int MPMCLab,int DSPLab,int MS,int EMS,int VLSILab,int MWDCLab,int VLSI,int MWE,int CN,int TSS,int CMC,int WCN,int MINI,int SEM,int MP,int V,int RS)
{
NSString *studentName=stuName;
unsigned short int englishMarks=english;
unsigned short int englishLangCommSkills=ELCS;
unsigned short int engineeringWorkshop=EW;
unsigned short int maths1=M1;
unsigned short int mathsMethods=MM;
unsigned short int engineeringPhysics=EP;
unsigned short int engineeringChemistry=EC;
unsigned short int computerProgDataStructures=CPDS;
unsigned short int engineeringDrawing=ED;
unsigned short int compProgLab=CPL;
unsigned short int engineeringPhysicsLab=EPL;
unsigned short int passMarks1=35;
unsigned short int passMarks2=26;
unsigned short int firstYearTotalMarks=englishMarks+englishLangCommSkills+engineeringWorkshop+maths1+mathsMethods+engineeringPhysics+engineeringChemistry+computerProgDataStructures+engineeringDrawing+compProgLab+engineeringPhysicsLab;
float firstYearPercentage=(float)firstYearTotalMarks/10;
NSLog(@"%@ got english marks=%i\n english Language & Communication Skills=%i\n engineering workshop Marks=%i\n maths1 Marks=%i\n maths methods marks=%i\n engineering physics Marks=%i\n engineering chemistry marks=%i\n computer programming & Data Structures marks=%i\n engineering drawing Marks=%i\n computer programming Lab Marks=%i\n engineering physics lab Marks=%i",studentName,englishMarks,englishLangCommSkills,engineeringWorkshop,maths1,mathsMethods,engineeringPhysics,engineeringChemistry,computerProgDataStructures,engineeringDrawing,compProgLab,engineeringPhysicsLab);
NSLog(@"%@ First Year Total Marks=%i",studentName,firstYearTotalMarks);
NSLog(@"%@ First Year Percentage=%f",studentName,firstYearPercentage);
if (english>=passMarks1 && englishLangCommSkills>=passMarks2 && engineeringWorkshop>=passMarks2 && maths1>=passMarks1 && mathsMethods>=passMarks1 && engineeringPhysics>=passMarks1 && engineeringChemistry>=passMarks1 && computerProgDataStructures>=passMarks1 && compProgLab>=passMarks2 && engineeringPhysicsLab>=passMarks2) {
NSLog(@"%@ 1 Year pass",studentName);
} else {
NSLog(@"%@ 1 Year fail",studentName);
}
//2y-1sm
unsigned short int maths3=M3;
unsigned short int probabilityTheoryAndStocProcess=PTSP;
unsigned short int environmentStudies=ES;
unsigned short int electricCircuits=ECir;
unsigned short int electronicDeviceCircuit=EDC;
unsigned short int signalsAndSystems=SS;
unsigned short int electronicDeviceCircuitLab=EDCLab;
unsigned short int basicSimulationLab=BSLab;
unsigned short int secondYear1SemTotal=maths3+probabilityTheoryAndStocProcess+environmentStudies+electricCircuits+
electronicDeviceCircuit+signalsAndSystems+electronicDeviceCircuitLab+basicSimulationLab;
float secondYear1SemPercentage=(float)secondYear1SemTotal/7.5;
NSLog(@"%@ got probabilityTheoryAndStocProcess Marks=%i\n environmentStudies Marks=%i\n electricCircuits Marks=%i\n electronicDeviceCircuit Marks=%i\n signalsAndSystems Marks=%i\n electronicDeviceCircuitLab Marks=%i\n basicSimulationLab Marks=%i",studentName,probabilityTheoryAndStocProcess,environmentStudies,electricCircuits,electronicDeviceCircuit,signalsAndSystems,electronicDeviceCircuitLab,basicSimulationLab);
NSLog(@"%@ secondYear1SemTotal Marks=%i",studentName,secondYear1SemTotal);
NSLog(@"%@ secondYear1SemPercentage=%f",studentName,secondYear1SemPercentage);
if (maths3>=passMarks1 && probabilityTheoryAndStocProcess>=passMarks1 && environmentStudies>=passMarks1 && electricCircuits>=passMarks1 && electronicDeviceCircuit>=passMarks1 && signalsAndSystems>=passMarks1 && electronicDeviceCircuitLab>=passMarks2 && basicSimulationLab>=passMarks2) {
NSLog(@"%@ 2-1 pass",studentName);
} else {
NSLog(@"%@ 2-1 fail",studentName);
}
//2-2
unsigned short int principlesOfElectricalEngineering=PEE;
unsigned short int electronicCircuitAnalysis=ECA;
unsigned short int pulseAndDigitalCircuits=PDC;
unsigned short int switchingTheoryAndLogicalDesign=STLD;
unsigned short int electroMagneticTheoryAndTransmissionLines=EMTL;
unsigned short int electricalEngineeringLab=EELab;
unsigned short int electronicCircuitAnalysisLab=ECALab;
unsigned short int pulseAndDigitalCircuitLab=PDCLab;
unsigned short int secondYear2SemTotal=principlesOfElectricalEngineering+electronicCircuitAnalysis+pulseAndDigitalCircuits+switchingTheoryAndLogicalDesign+electroMagneticTheoryAndTransmissionLines+electricalEngineeringLab+electronicCircuitAnalysisLab+pulseAndDigitalCircuitLab;
float secondYear2SemPercantage=(float)secondYear2SemTotal/7.25;
NSLog(@"%@ got principlesOfElectricalEngineering Marks=%i\n electronicCircuitAnalysis Marks=%i\n pulseAndDigitalCircuits Marks=%i\n switchingTheoryAndLogicalDesign Marks=%i\n electroMagneticTheoryAndTransmissionLines Marks=%i\n electricalEngineeringLab Marks=%i\n electronicCircuitAnalysisLab Marks=%i\n pulseAndDigitalCircuitLab Marks=%i",studentName,principlesOfElectricalEngineering,electronicCircuitAnalysis,pulseAndDigitalCircuits,switchingTheoryAndLogicalDesign,electroMagneticTheoryAndTransmissionLines,electricalEngineeringLab,electronicCircuitAnalysisLab,pulseAndDigitalCircuitLab);
NSLog(@"%@ got second Year 2Sem Total Marks=%i",studentName,secondYear2SemTotal);
NSLog(@"%@ got second Year 2Sem Percentage=%f",studentName,secondYear2SemPercantage);
if (principlesOfElectricalEngineering>=passMarks1 && electronicCircuitAnalysis>=passMarks1 && pulseAndDigitalCircuits>=passMarks1 && switchingTheoryAndLogicalDesign>=passMarks1 && electroMagneticTheoryAndTransmissionLines>=passMarks1 && electricalEngineeringLab>=passMarks2 && electronicCircuitAnalysisLab>=passMarks2 && pulseAndDigitalCircuitLab>=passMarks2) {
NSLog(@"%@ 2-2 pass",studentName);
} else {
NSLog(@"%@ 2-2 fail",studentName);
}
//3-1
unsigned short int controlSystems=CS;
unsigned short int computerOrganization=CO;
unsigned short int antennasAndWavePropagation=AWP;
unsigned short int analogCommunications=AC;
unsigned short int ICApplications=IC;
unsigned short int analogCommunicationLab=ACLab;
unsigned short int ICApplicationsLab=ICLab;
unsigned short int thirdYear1SemTotal=controlSystems+computerOrganization+antennasAndWavePropagation+analogCommunications+ICApplications+analogCommunicationLab+ICApplicationsLab;
float thirdYear1SemPercentage= (float)thirdYear1SemTotal/7.5;
NSLog(@"%@ got controlSystems Marks=%i\n computerOrganization Marks=%i\n antennasAndWavePropagation Marks=%i\n analogCommunications Marks=%i\n ICApplications Marks=%i\n analogCommunicationLab Marks=%i\n ICApplicationsLab Marks=%i",studentName,controlSystems,computerOrganization,antennasAndWavePropagation,analogCommunications,ICApplications,analogCommunicationLab,ICApplicationsLab);
NSLog(@"%@ thirdYear 1Sem Total Marks=%i",studentName,thirdYear1SemTotal);
NSLog(@"%@ thirdYear 1Sem Percentage=%f",studentName,thirdYear1SemPercentage);
if (controlSystems>=passMarks1 && computerOrganization>=passMarks1 && antennasAndWavePropagation>=passMarks1 && analogCommunications>=passMarks1 && ICApplications>=passMarks1 && analogCommunicationLab>=passMarks2 && ICApplicationsLab>=passMarks2) {
NSLog(@"%@ 3-1 pass",studentName);
} else {
NSLog(@"%@ 3-1 fail",studentName);
}
//3-2
unsigned short int managerialEconomicsAndFinancialAnalysis=MEFA;
unsigned short int advancedEnglishCommunicationSkills=AECS;
unsigned short int operatingSystem=OS;
unsigned short int digitalCommunications=DC;
unsigned short int microProcessorAndMicroController=MPMC;
unsigned short int digitalSignalProcessing=DSP;
unsigned short int microProcessorAndMicroControllerLab=MPMCLab;
unsigned short int digitalSignalProcessingLab=DSPLab;
unsigned short int thirdYear2SemTotal=managerialEconomicsAndFinancialAnalysis+advancedEnglishCommunicationSkills+operatingSystem+digitalCommunications+microProcessorAndMicroController+digitalSignalProcessing+microProcessorAndMicroControllerLab+digitalSignalProcessingLab;
float thirdYear2SemPercentage=(float)thirdYear2SemTotal/7.25;
NSLog(@"%@ got managerialEconomicsAndFinancialAnalysis Marks=%i\n advancedEnglishCommunicationSkills Marks=%i\n operatingSystem Marks=%i\n digitalCommunications Marks=%i\n microProcessorAndMicroController Marks=%i\n digitalSignalProcessing Marks=%i\n microProcessorAndMicroControllerLab Marks=%i\n digitalSignalProcessingLab Marks=%i",studentName,managerialEconomicsAndFinancialAnalysis,advancedEnglishCommunicationSkills,operatingSystem,digitalCommunications,microProcessorAndMicroController,digitalSignalProcessing,microProcessorAndMicroControllerLab,digitalSignalProcessingLab);
NSLog(@"%@ thirdYear2SemTotal Marks=%i",studentName,thirdYear2SemTotal);
NSLog(@"%@ thirdYear2SemPercentage=%f",studentName,thirdYear2SemPercentage);
if (managerialEconomicsAndFinancialAnalysis>=passMarks1 && advancedEnglishCommunicationSkills>=passMarks2 && operatingSystem>=passMarks1 && digitalCommunications>=passMarks1 && microProcessorAndMicroController>=passMarks1 && digitalSignalProcessing>=passMarks1 && microProcessorAndMicroControllerLab>=passMarks2 && digitalSignalProcessingLab>=passMarks2) {
NSLog(@"%@ 3-2 pass",studentName);
} else {
NSLog(@"%@ 3-2 fail",studentName);
}
//4-1
unsigned short int managementScience=MS;
unsigned short int embeddedSystems=EMS;
unsigned short int ECADLab=VLSILab;
unsigned short int microWaveEnggAndDigitalCommLab=MWDCLab;
unsigned short int VLSIDesign=VLSI;
unsigned short int microWaveEngineering=MWE;
unsigned short int computerNetworks=CN;
unsigned short int teleCommunicationSwitchingSystems=TSS;
unsigned short int fourthYear1SemTotal=managementScience+embeddedSystems+ECADLab+microWaveEnggAndDigitalCommLab+VLSIDesign+microWaveEngineering+computerNetworks+teleCommunicationSwitchingSystems;
float fourthYear1SemPercentage=(float)fourthYear1SemTotal/7.5;
NSLog(@"%@ got managementScience Marks=%i\n embeddedSystems Marks=%i\n ECADLab Marks=%i\n microWaveEnggAndDigitalCommLab Marks=%i\n VLSIDesign Marks=%i\n microWaveEngineering marks=%i\n computerNetworks Marks=%i\n teleCommunicationSwitchingSystems Marks=%i",studentName,managementScience,embeddedSystems,ECADLab,microWaveEnggAndDigitalCommLab,VLSIDesign,microWaveEngineering,computerNetworks,teleCommunicationSwitchingSystems);
NSLog(@"%@ fourthYear1SemTotal Marks=%i",studentName,fourthYear1SemTotal);
NSLog(@"%@ fourthYear1SemPercentage=%f",studentName,fourthYear1SemPercentage);
if (managementScience>=passMarks1 && embeddedSystems>=passMarks1 && ECADLab>=passMarks2 && microWaveEnggAndDigitalCommLab>=passMarks2 && VLSIDesign>=passMarks1 && microWaveEngineering>=passMarks1 && computerNetworks>=passMarks1 && teleCommunicationSwitchingSystems>passMarks1) {
NSLog(@"%@ 4-1 pass",studentName);
} else {
NSLog(@"%@ 4-1 fail",studentName);
}
//4-2
unsigned short int cellularAndMobileComm=CMC;
unsigned short int wirelessCommAndNetwork=WCN;
unsigned short int miniProject=MINI;
unsigned short int seminar=SEM;
unsigned short int majorProject=MP;
unsigned short int viva=V;
unsigned short int radarSystems=RS;
unsigned short int fourthYear2SemTotal=cellularAndMobileComm+wirelessCommAndNetwork+miniProject+seminar+majorProject+viva+radarSystems;
float fourthYear2SemPercentage=(float)fourthYear2SemTotal/7;
NSLog(@"%@ got cellularAndMobileComm Marks=%i\n wirelessCommAndNetwork Marks=%i\n miniProject Marks=%i\n seminar Marks=%i\n majorProject Marks=%i\n viva Marks=%i\n radarSystems Marks=%i",studentName,cellularAndMobileComm,wirelessCommAndNetwork,miniProject,seminar,majorProject,viva,radarSystems);
NSLog(@"%@ fourthYear 2Sem Total Marks=%i",studentName,fourthYear2SemTotal);
NSLog(@"%@ fourthYear 2Sem Percentage=%f",studentName,fourthYear2SemPercentage);
if (cellularAndMobileComm>=passMarks1 && wirelessCommAndNetwork>=passMarks1 && miniProject>=passMarks2 && seminar>=passMarks2 && majorProject>=passMarks1 && viva>=passMarks1 && radarSystems>=passMarks1) {
NSLog(@"%@ 4-2 pass",studentName);
} else {
NSLog(@"%@ 4-2 fail",studentName);
}
unsigned short int btechTotalMarks=firstYearTotalMarks+secondYear1SemTotal+secondYear2SemTotal+thirdYear1SemTotal+thirdYear2SemTotal+fourthYear1SemTotal+fourthYear2SemTotal;
float btechPercentage=(float)btechTotalMarks/52;
NSLog(@"%@ btechTotalMarks=%i",studentName,btechTotalMarks);
NSLog(@"%@ btechPercentage=%f",studentName,btechPercentage);
if (btechPercentage>=70) {
NSLog(@"%@ got Distinction",studentName);
} else if (btechPercentage>=60 && btechPercentage<70){
NSLog(@"%@ got First Class",studentName);
}else if (btechPercentage>=50 && btechPercentage<60) {
NSLog(@"%@ got Second Class",studentName);
}else if (btechPercentage<50) {
NSLog(@"%@ got Third Class",studentName);
}
NSLog(@"********************************************");
}
int main(int argc, const char * argv[]) {
btechMarks(@"swamy",88,74,73,58,86,49,54,50,63,75,64,89,99,89,89,89,90,54,52,89,89,89,89,98,52,52,52,98,89,78,85,87,96,99,54,74,65,74,46,64,63,66,68,77,51,68,67,57,57,68,66,53,73,48,48,195,97,55);
return 0;
}
Sign up here with your email
ConversionConversion EmoticonEmoticon