int main(void) { int i = 0; int static num[SIZE] = { 90, 85, 100, 50, 50, 85, 60, 70, 55, 55, 80, 95, 70, 60, 95, 80, 100, 75, 70, 95, 90, 90, 70, 95, 50, 65, 85, 95, 100, 65}; //printf("Enter array:\n"); //while(1 && i < SIZE) { // scanf("%d", &num[i]); // if (num[i] == -1) { // break; // } // i++; //} printf("%s\n", "Unsorted:"); printArray(num, SIZE); insertionSort(num, SIZE); printf("%s\n", "Ascending Order:"); printArray(num, SIZE); frequency(num, SIZE); grading(num, SIZE); printf("%8s %6.1lf\n", "Mean:", mean(num, SIZE)); printf("%8s %4d\n", "Mode:", mode(num, SIZE)); printf("%8s %6.1lf\n", "Median:", median(num, SIZE)); return 0; }
/***** メイン関数 ********/ int main(void) { int m, f, r; while (scanf("%d %d %d", &m, &f, &r), ~m||~f||~r) { printf("%c\n", grading(m, f, r)); } return 0; }
// ---------------------------------------------------------------------- void moduleSummary(const char *dirName = "", const char *module_type) { printf("\nmoduleSummary> Starting ...\n"); nChips = 16; startChip = 0; if ( !strcmp(module_type,"a") ) { nChips = 8; startChip = 0; } if ( !strcmp(module_type,"b") ) { nChips = 8; startChip = 8; } sprintf(fname, "%s/%s", dirName, fileName); inputFile = fopen(fname, "r"); if (!inputFile) { printf("\nmoduleSummary> ----> COULD NOT FIND %s IN DIRECTORY %s\n", fileName, dirName); printf("moduleSummary> ----> Aborting execution of moduleSummaryPage.C ... \n\n", fileName, dirName); break; } sprintf(fname, "%s/%s", dirName, adFileName); inputFile = fopen(fname, "r"); if (!inputFile) { sprintf(adFileName,"%s", fileName); } else { printf("moduleSummary> ----> found separate address decoding file: %s\n", adFileName); fclose (inputFile); } sprintf(fname, "%s/../../macros/criteria.dat", dirName); if ( !readCriteria(fname) ) { printf("\nmoduleSummary> ----> COULD NOT READ GRADING CRITERIA !!!\n"); printf("moduleSummary> ----> Aborting execution of moduleSummaryPage.C ... \n\n", fileName, dirName); break; } TFile *f = new TFile(Form("%s/%s", dirName, fileName)); gROOT->SetStyle("Plain"); gStyle->SetPalette(1); gStyle->SetOptStat(0); gStyle->SetTitle(0); gStyle->SetStatFont(132); gStyle->SetTextFont(132); gStyle->SetLabelFont(132, "X"); gStyle->SetLabelFont(132, "Y"); gStyle->SetLabelSize(0.08, "X"); gStyle->SetLabelSize(0.08, "Y"); gStyle->SetTitleSize(0.08, "X"); gStyle->SetTitleSize(0.08, "Y"); gStyle->SetNdivisions(10, "X"); gStyle->SetNdivisions(8, "Y"); gStyle->SetTitleFont(132); gROOT->ForceStyle(); tl = new TLatex; tl->SetNDC(kTRUE); tl->SetTextSize(0.1); ts = new TLatex; ts->SetNDC(kTRUE); ts->SetTextSize(0.09); line = new TLine; line->SetLineColor(kRed); line->SetLineStyle(kDashed); box = new TBox; box->SetFillColor(3); box->SetFillStyle(3004); c1 = new TCanvas("c1", "", 900, 700); c1->Clear(); c1->Divide(1,4); int EColor[6] = { 4, 8, 6, 1 }; int EMarkerStyle[10] = { 4, 25, 26, 23, 21, 27, 28, 20, 30, 29 }; TH2D *mThreshold = new TH2D("mThreshold", "", 416, 0., 416., 160, 0., 160.); TH2D *mBumps = new TH2D("mBumps", "", 416, 0., 416., 160, 0., 160.); TH2D *mAddr = new TH2D("mAddr", "", 416, 0., 416., 160, 0., 160.); double mThresholdmin(0.), mThresholdmax(255.); const int nfit = 4; TString fitNames[] = {TString("Noise"), TString("Vcal Thr. Width"), TString("Rel. Gain Width"), TString("Pedestal Spread")}; float limitB[] = { noiseB, trimmingB, gainB, pedestalB }; // limit for grading float limitC[] = { noiseC, trimmingC, gainC, pedestalC }; // limit for grading float max[] = { noiseB + 100., trimmingB + 100., gainB + 0.05, pedestalB + 1000. }; // scaling of histogram TH1D *fit[nfit]; TH1D *fitEntries[nfit]; for(int ifit = 0; ifit < nfit; ++ifit) { fit[ifit] = new TH1D(Form("%s", fitNames[ifit].Data()),"", nChips, float(startChip), float(startChip+nChips)); fitEntries[ifit] = new TH1D(Form("n%s", fitNames[ifit].Data()),"", nChips, float(startChip), float(startChip+nChips)); fit[ifit]->SetLineColor(EColor[ifit]); fit[ifit]->SetMarkerColor(EColor[ifit]); fit[ifit]->SetMarkerStyle(EMarkerStyle[ifit]); fit[ifit]->SetMarkerSize(0.5); } for (int i = startChip; i < startChip+nChips; i++) { addVcalThreshold(dirName, i, mThreshold); } for (int i = startChip; i < startChip+nChips; i++) { addChip("vcals_xtalk", i, mBumps); } TFile *f1 = new TFile(Form("%s/%s", dirName, adFileName)); for (int i = startChip; i < startChip+nChips; i++) { addChip("AddressDecoding", i, mAddr);} if ( nChips < 16 && startChip == 0 ) { for (int i = 8; i < nChips+8; i++) { removeChip(i, mThreshold, -99); } for (int i = 8; i < nChips+8; i++) { removeChip(i, mBumps, -99); } for (int i = 8; i < nChips+8; i++) { removeChip(i, mAddr, -99); } } if ( nChips < 16 && startChip == 8 ) { for (int i = 0; i < nChips; i++) { removeChip(i, mThreshold, -99); } for (int i = 0; i < nChips; i++) { removeChip(i, mBumps, -99); } for (int i = 0; i < nChips; i++) { removeChip(i, mAddr, -99); } } TString noslash(dirName); noslash.ReplaceAll("/", ""); noslash.ReplaceAll("..", ""); c1->cd(1); if ( mThreshold->GetMaximum() < mThresholdmax ) { mThresholdmax = mThreshold->GetMaximum(); } if ( mThreshold->GetMinimum() > mThresholdmin ) { mThresholdmin = mThreshold->GetMinimum(); } mThreshold->GetZaxis()->SetRangeUser(mThresholdmin,mThresholdmax); mThreshold->DrawCopy("colz"); tl->DrawLatex(0.1, 0.92, "Vcal threshold"); tl->DrawLatex(0.75, 0.92, Form("%s",noslash.Data())); if ( nChips < 16 && startChip == 0 ) { box->SetFillColor(29); box->DrawBox( 0, 0, 416, 80); } if ( nChips < 16 && startChip == 8 ) { box->SetFillColor(29); box->DrawBox( 0, 80, 416, 160); } c1->cd(2); mBumps->SetMaximum(2.); mBumps->SetMinimum(-2.); mBumps->DrawCopy("colz"); tl->DrawLatex(0.1, 0.92, "Bump bonding map"); if ( nChips < 16 && startChip == 0 ) { box->SetFillColor(29); box->DrawBox( 0, 0, 416, 80); } if ( nChips < 16 && startChip == 8 ) { box->SetFillColor(29); box->DrawBox( 0, 80, 416, 160); } c1_3->Divide(3,1); c1_3->cd(1); gPad->SetBottomMargin(0.2); gPad->SetLogy(1); gPad->SetLeftMargin(0.20); gPad->SetRightMargin(0.01); float V, A; float x_V[250], y_A[250]; int i(0); float iv100(0.); float iv150(0.); float iv150_17(0.); float iv100_17(0.); float variation(0.); float variation_17(0.); FILE *ivFile, *sumWrite, *sumRead, *gradWrite; sprintf(fname, "%s/iv.dat", dirName); ivFile = fopen(fname, "r"); if (!ivFile) { printf("moduleSummary> !!!!!!!!! ----> Could not open file %s to read data\n", fname); } else { fclose(ivFile); ifstream is(fname); char buffer[200]; while (is.getline(buffer, 200, '\n')) { // check that line starts with a number if (buffer[0] != '1' && buffer[0] != '2' && buffer[0] != '3' && buffer[0] != '4' && buffer[0] != '5' && buffer[0] != '6' && buffer[0] != '7' && buffer[0] != '8' && buffer[0] != '9' ) {continue;} sscanf(buffer, "%e %e", &V, &A); x_V[i] = V; y_A[i] = 1e6*A; if ( i > 0 ) { // check that voltage is increasing & find current at 150 V if ( x_V[i] < x_V[i-1] ) { continue; } if ( x_V[i] >= 100. && x_V[i-1] <= 100. ) { iv100 = y_A[i-1] + (100. - x_V[i-1])*(y_A[i] - y_A[i-1])/(x_V[i] - x_V[i-1]); } if ( x_V[i] >= 150. && x_V[i-1] <= 150. ) { iv150 = y_A[i-1] + (150. - x_V[i-1])*(y_A[i] - y_A[i-1])/(x_V[i] - x_V[i-1]); } } i++; } if ( iv100 != 0. ) { variation = iv150/iv100; } else { variation = 0; } if ( i > 0 ) { TGraph *g1 = new TGraph(i,x_V,y_A); g1->Draw("aC"); g1->SetTitle(""); g1->SetLineColor(4); g1->SetLineWidth(2); g1->GetXaxis()->SetTitle("Voltage [V]"); g1->GetYaxis()->SetTitle("Current [#muA]"); g1->GetYaxis()->SetDecimals(); g1->GetYaxis()->SetTitleOffset(1.2); g1->GetYaxis()->CenterTitle(); tl->DrawLatex(0.2, 0.92, "I-V-Curve"); ts->DrawLatex(0.25, 0.78, Form("I(150 V) = %.2f #muA", iv150)); ts->DrawLatex(0.25, 0.65, Form("I_{150}/I_{100} = %.2f ", variation)); } } char mod[20] = noslash.Data(), waf[20] = "", test[20] = "",tmon[20], trim[20], ph[20], cycl[20]; int tday; int dp(0), dm(0), db(0), dt(0), da(0); int root(0), a(0), b(0), c(0); int badRocs[3] = {0, 0, 0}; char iv; float voltage, current; float temp, tempSigma, sollTemp; float cyclMean, cyclSigma; char string[1000]; c1_3->cd(2); sprintf(fname, "%s/summaryTest.txt", dirName); sumRead = fopen(fname, "r"); if (!sumRead) { printf("\nmoduleSummary> !!!!!!!!! ----> File %s does not exist yet...\n", fname); printf("moduleSummary> !!!!!!!!! ----> Module summary not complete!\n\n"); } else { fgets(string, 200, sumRead); // fscanf(sumRead, "%s %s", string, mod); fscanf(sumRead, "%s %s %s %s", string, string, waf, test); fscanf(sumRead, "%s %i %i %i %i %i", string, &dp, &dm, &db, &dt, &da); fscanf(sumRead, "%s %s %s %s %s %i %i %i", string, string, string, string, string, &a, &b, &c); badRocs[0]=a; badRocs[1]=b; badRocs[2]=c; fscanf(sumRead, "%s %s %i", string, string, &root); fscanf(sumRead, "%s %s %s %s %s %i %s %s", string, string, string, string, tmon, &tday, string, string); fgets(string, 200, sumRead); fscanf(sumRead, "%s %s", string, trim); fgets(string, 200, sumRead); fscanf(sumRead, "%s %s", string, ph); fgets(string, 200, sumRead); fscanf(sumRead, "%s %f %f %s %f", string, &temp, &tempSigma, string, &sollTemp); fscanf(sumRead, "%s %s %s %f %f", string, string, cycl, &cyclMean, &cyclSigma); fclose(sumRead); tl->SetTextSize(0.09); tl->SetTextFont(22); double y = 0.92; tl->DrawLatex(0.01, y, Form("Test Summary of %s %s", waf, test)); tl->SetTextFont(132); tl->SetTextSize(0.09); y -= 0.16; tl->DrawLatex(0.01, y, "ROCs > 1% defects: "); tl->DrawLatex(0.5, y, Form("%i", badRocs[0])); y -= 0.12; tl->DrawLatex(0.01, y, Form("Dead Pixel: ")); tl->DrawLatex(0.5, y, Form("%i", dp)); y -= 0.11; tl->DrawLatex(0.01, y, "Mask Defects: "); tl->DrawLatex(0.5, y, Form("%i", dm)); y -= 0.11; tl->DrawLatex(0.01, y, "Dead Bumps: "); tl->DrawLatex(0.5, y, Form("%i", db)); y -= 0.11; tl->DrawLatex(0.01, y, "Dead Trimbits: "); tl->DrawLatex(0.5, y, Form("%i", dt)); y -= 0.11; tl->DrawLatex(0.01, y, "Address Probl: "); tl->DrawLatex(0.5, y, Form("%i", da)); y = 0.76; tl->DrawLatex(0.72, y, Form("Tested on:")); y -= 0.11; tl->DrawLatex(0.72, y, "Temp. [^{o}C]: "); y -= 0.11; tl->DrawLatex(0.72, y, "Trim / phCal: "); y -= 0.11; tl->DrawLatex(0.72, y, "Therm. cycl.: "); y -= 0.11; tl->DrawLatex(0.72, y, "TBM1: "); y -= 0.11; tl->DrawLatex(0.72, y, "TBM2: "); c1_3->cd(3); y = 0.76; tl->DrawLatex(0.01, y, Form("%s %i", tmon, tday)); y -= 0.11; tl->DrawLatex(0.01, y, Form("%.1f +- %.1f", temp, tempSigma)); y -= 0.11; tl->DrawLatex(0.01, y, Form("%s / %s", trim, ph)); y -= 0.11; tl->DrawLatex(0.01, y, Form("%s", cycl)); } int result; int tbm1(1), tbm2(1); TParameter<int>* par; y -= 0.11; par = (TParameter<int>*)f->Get("TBM1"); if (par) { tbm1 = par->GetVal(); if (tbm1 == 0) tl->DrawLatex(0.01, y, "ok"); else tl->DrawLatex(0.01, y, Form("Err%i", tbm1)); } y -= 0.11; par = (TParameter<int>*)f->Get("TBM2"); if (par) { tbm2 = par->GetVal(); if (tbm2 == 0) tl->DrawLatex(0.01, y, "ok"); else tl->DrawLatex(0.01, y, Form("Err%i", tbm2)); } // Convert current to currents at room temperature double Tk = 273.15; double egap = 1.12; double kB = 8.617343E-5; double tTest; // tTest = temp; // --> averaged temperature tTest = sollTemp; double expnt = egap*(1/(Tk+tTest) - 1/(Tk+17))/(2*kB); double fctr = (Tk+17)*(Tk+17)/((Tk+tTest)*(Tk+tTest)); iv150_17 = iv150*fctr*TMath::Exp(expnt); iv100_17 = iv100*fctr*TMath::Exp(expnt); if ( iv100_17 != 0 ) variation_17 = iv150_17/iv100_17; printf("\nmoduleSummary> converted I(150 V, %.0f C) = %.4f to I(150 V, 17 C) = %.4f \n", tTest, iv150, iv150_17); printf("moduleSummary> converted I(100 V, %.0f C) = %.4f to I(100 V, 17 C) = %.4f \n\n", tTest, iv100, iv100_17); if ( iv150_17 != 0 ) { c1_3->cd(3); y = 0.32; tl->DrawLatex(0.25, y, "I(150 V) [T = 17 ^{o}C]"); tl->DrawLatex(0.72, y, Form("%.2f #muA", iv150_17)); c1_3->cd(2); } if ( iv100_17 != 0 ) { c1_3->cd(3); y = 0.21; tl->DrawLatex(0.25, y, "I_{150}/I_{100} [T = 17 ^{o}C]"); tl->DrawLatex(0.72, y, Form("%.2f", variation_17)); c1_3->cd(2); } sprintf(fname, "%s/summaryTest.txt", dirName); sumWrite = fopen(fname, "a"); fputs(Form("TBM1 %i\n", tbm1), sumWrite); fputs(Form("TBM2 %i\n", tbm2), sumWrite); fputs(Form("I 150 %f \n", iv150_17), sumWrite); fputs(Form("I150/I100 %f \n", variation_17), sumWrite); fputs(Form("iv datapoints %i \n", i), sumWrite); // c1->cd(4); // mAddr->DrawCopy("colz"); // mAddr->SetMaximum(1.); // mAddr->SetMinimum(0.); // tl->DrawLatex(0.1, 0.92, "Address decoding map"); c1_4->Divide(4,1); qualification(dirName, fit, fitEntries); for (int i = 0; i < 4; i++) { // makePlot(TH1 *h, const char *title, int pad, double Ymin, double Ymax, double Ylimit) makePlot(fit[i], fitNames[i].Data(), i+1, 0, max[i], limitB[i], limitC[i]); } int grad(0); FILE *missingData; sprintf(fname, "%s/comment_3.txt", dirName); missingData = fopen(fname, "r"); if ( missingData ) { printf("\nmoduleSummary> !!!!!!!!! ----> Found file for missing data: comment_3.txt => GRADE C!\n\n"); grad = 3; fclose(missingData); } else { grad = grading(badRocs, iv150_17, variation_17, fit, fitEntries, limitB, limitC, test); } c1_3->cd(3); tl->SetTextSize(0.09); tl->SetTextFont(22); if (grad == 1) { tl->DrawLatex(0.6, 0.92, "GRADE: A"); fputs("Grade A\n", sumWrite); } if (grad == 2) { tl->DrawLatex(0.6, 0.92, "GRADE: B"); fputs("Grade B\n", sumWrite); } if (grad == 3) { tl->DrawLatex(0.6, 0.92, "GRADE: C"); fputs("Grade C\n", sumWrite); } sprintf(fname, "%s/gradingTest.txt", dirName); gradWrite = fopen(fname, "a"); if (!gradWrite) { printf("\nmoduleSummary> !!!!!!!!! ----> File %s does not exist yet...\n", fname); printf("moduleSummary> !!!!!!!!! ----> Grading data could not be written to file!\n\n"); } else { fputs(Form("Noise %i %i\n", fitsProblemB[0], fitsProblemC[0]), gradWrite); fputs(Form("VcalThrWidth %i %i\n", fitsProblemB[1], fitsProblemC[1]), gradWrite); fputs(Form("RelGainWidth %i %i\n", fitsProblemB[2], fitsProblemC[2]), gradWrite); fputs(Form("PedSpread %i %i\n", fitsProblemB[3], fitsProblemC[3]), gradWrite); fputs(Form("I150V %i %i\n", currentProblemB, currentProblemC), gradWrite); fputs(Form("Iratio %i 0\n", slopeProblemB), gradWrite); } c1->SaveAs(Form("%s/moduleSummary_%s%s.ps", dirName, waf, test)); c1->SaveAs(Form("%s/%s%s.gif", dirName, waf, test)); printf("\nmoduleSummary> ................................................ finished\n"); }
bool occ_make_mesh::run_impl() { io::FileType ft; if (filetype.valid()) ft = io::from_string( filetype() ); else ft = io::from_filename( filename() ); try { output_parameter_proxy<netgen::mesh> omp(output_mesh); ::netgen::OCCGeometry * geometry; if (ft == io::OCC_STEP) geometry = ::netgen::LoadOCC_STEP( filename().c_str() ); else if (ft == io::OCC_IGES) geometry = ::netgen::LoadOCC_IGES( filename().c_str() ); else { error(1) << "File type \"" << io::to_string(ft) << "\" is not supported" << std::endl; return false; } // http://sourceforge.net/p/netgen-mesher/discussion/905307/thread/7176bc7d/ TopTools_IndexedMapOfShape FMap; FMap.Assign( geometry->fmap ); if (!FMap.Extent()) { std::cout << "Error retrieving Face map... (OpenCascade error)" << endl; return false; } ::netgen::MeshingParameters mp; mp.elementorder = 0; mp.quad = 0; mp.inverttets = 0; mp.inverttrigs = 0; if (cell_size.valid()) { mp.uselocalh = 1; mp.maxh = cell_size(); } mp.curvaturesafety = curvature_safety_factor(); mp.segmentsperedge = segments_per_edge(); mp.grading = grading(); int perfstepsend = 6; omp()().geomtype = ::netgen::Mesh::GEOM_OCC; ::netgen::occparam.resthcloseedgeenable = 0; //mp.closeedgeenable; ::netgen::occparam.resthcloseedgefac = 1.0; //mp.closeedgefact; ::netgen::mparam = mp; omp()().DeleteMesh(); ::netgen::OCCSetLocalMeshSize( *geometry, omp()() ); ::netgen::OCCFindEdges(*geometry, omp()()); ::netgen::OCCMeshSurface(*geometry, omp()(), perfstepsend); omp()().CalcSurfacesOfNode(); ::netgen::MeshVolume(mp, omp()()); ::netgen::RemoveIllegalElements( omp()() ); ::netgen::MeshQuality3d( omp()() ); ::netgen::OptimizeVolume(mp, omp()() ); } catch (::netgen::NgException const & ex) { error(1) << "Netgen Error: " << ex.What() << std::endl; return false; } return true; }
int main() { start: printf("\n\n\n"); char header [500]="\t \xB2\xDB Welcome to my project named High School Result Helper \xDB\xB2\n\n"; int m; for(m=0; m<strlen(header); m++) { usleep(5400); printf("%c",header[m]); } usleep(3000); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2 Login Page \xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n"); char stre[33]="passhimu"; char uname[33]="humaun kabir"; char unam[33]; char str[33]; printf("\xDB\xDB\xB2\xB2 Enter Username: "******"\n\n"); printf("\xDB\xDB\xB2\xB2 Enter Password: "******"cls"); printf("\n\n\n\t"); char laod[1000] = "Loading \xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n\n\n"; int la; for(la=0; la<=strlen(laod); la++) { usleep(7000); printf("%c",laod[la]); } system("cls"); usleep(5500); goto head; } else { printf("\n\nSorry Username or Password doesnt match. Press enter to retry.. !\n\n"); char c; scanf("%c",&c); if(c==' ' || c=='\n') { system("cls"); goto start; } } head: printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2 About Author \xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n"); printf("A S M Humaun Kabir\nDept. of Computer Science and Engineering.\nCity University.\nEmail: [email protected]\nWant to be a great programmer in future,keep me in your prayer.Thank you !\n\n"); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n\n\n"); printf("\xB2\xB2\xB2 Enter your choice \xB2\xB2\xB2\xB2\n\n\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n\xDB\xDB\xB2\xB2 1.Calculate GPA of Individual student.\n\n\xDB\xDB\xB2\xB2 2.Creat Merit/Roll according to obtained marks of a class.\n\n\xDB\xDB\xB2\xB2 3.Exit\n\n\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n"); int jk; scanf("%d",&jk); //taking choice printf("\n\n"); switch(jk) { case 1: grading(); break; case 2: roll_mgmt(); break; case 3: printf("\xB2\xB2\xB2\xB2\xB2\xB2 Thank you for stopping by ! \xB2\xB2\xB2\xB2\xB2\xB2\n"); goto last; break; } printf("\n\n"); printf("\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2 Enter Choice \xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n\xDB\xB2 1.Main Menu.\n\n\xDB\xB2 2.Restart/Reset\n\n\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n"); int ch; scanf("%d",&ch); if(ch==3) printf("\xB2\xB2\xB2\xB2\xB2\xB2 Thank you for stopping by ! \xB2\xB2\xB2\xB2\xB2\xB2\n"); else if(ch==1) goto head; else if(ch==2) { system("cls"); goto head; } last: return 0; }