Results 1 to 9 of 9

Thread: marksheat in c++

  1. #1
    safiullahjan's Avatar
    safiullahjan is offline Senior Member+
    Last Online
    15th March 2017 @ 11:57 PM
    Join Date
    21 Aug 2011
    Location
    hyderabad sindh
    Age
    29
    Gender
    Male
    Posts
    151
    Threads
    62
    Credits
    31
    Thanked
    3

    Default marksheat in c++

    Asalam u alaikum bhai jan maine turbo c par aik marksheat banai graphics main us main student name , f name aur subjects k marks de diye lekin aakhir main grade declare nhi karta display main main if else statement bhi use ki barae mehrbaani coding main aagah karen k kiun nhi ho raha

  2. #2
    CTWO's Avatar
    CTWO is offline Senior Member+
    Last Online
    18th February 2016 @ 08:12 PM
    Join Date
    08 Jun 2010
    Location
    Lahore
    Gender
    Male
    Posts
    1,784
    Threads
    97
    Credits
    980
    Thanked
    408

    Default

    Thread Moved from C++

  3. #3
    safiullahjan's Avatar
    safiullahjan is offline Senior Member+
    Last Online
    15th March 2017 @ 11:57 PM
    Join Date
    21 Aug 2011
    Location
    hyderabad sindh
    Age
    29
    Gender
    Male
    Posts
    151
    Threads
    62
    Credits
    31
    Thanked
    3

    Default

    Quote CTWO said: View Post
    Thread Moved from C++
    kiun bhai mainey sahi session moved kia to kiun move kia

  4. #4
    sayhellotoit's Avatar
    sayhellotoit is offline Senior Member
    Last Online
    23rd September 2017 @ 07:51 PM
    Join Date
    01 May 2009
    Posts
    1,003
    Threads
    5
    Credits
    53
    Thanked
    127

    Default

    Wa-alaikum-assalam,
    Code bhi dain takeh bataya ja sakay keh kion nahi ho raha.

  5. #5
    khalliqie's Avatar
    khalliqie is offline Senior Member
    Last Online
    22nd May 2018 @ 02:18 PM
    Join Date
    02 Apr 2009
    Location
    Peshawar
    Age
    33
    Gender
    Male
    Posts
    2,493
    Threads
    141
    Credits
    1,230
    Thanked
    162

    Default

    Quote safiullahjan said: View Post
    Asalam u alaikum bhai jan maine turbo c par aik marksheat banai graphics main us main student name , f name aur subjects k marks de diye lekin aakhir main grade declare nhi karta display main main if else statement bhi use ki barae mehrbaani coding main aagah karen k kiun nhi ho raha
    bhai jan aap apna code yaha share karde take aap ke code main correction karke aap ko program faraha kia ja sake
    [FONT="Comic Sans MS"][CENTER][SIZE="5"][B][COLOR="MediumTurquoise"]"The nicest people tend to often be the ones who have been mistreated the most."[/COLOR][/B][/SIZE][/CENTER][/FONT]

  6. #6
    Zeeshanef's Avatar
    Zeeshanef is offline Advance Member
    Last Online
    28th December 2023 @ 02:18 PM
    Join Date
    30 Mar 2006
    Location
    Great Pakistan
    Gender
    Male
    Posts
    846
    Threads
    12
    Credits
    1,456
    Thanked
    46

    Default

    Quote safiullahjan said: View Post
    Asalam u alaikum bhai jan maine turbo c par aik marksheat banai graphics main us main student name , f name aur subjects k marks de diye lekin aakhir main grade declare nhi karta display main main if else statement bhi use ki barae mehrbaani coding main aagah karen k kiun nhi ho raha
    bhi hamare pas magic stick nahi ke usay ghumae, aor hamain aap ka code nazar aajaye.

    Pahle aap apna code share karain. Shukriya

  7. #7
    safiullahjan's Avatar
    safiullahjan is offline Senior Member+
    Last Online
    15th March 2017 @ 11:57 PM
    Join Date
    21 Aug 2011
    Location
    hyderabad sindh
    Age
    29
    Gender
    Male
    Posts
    151
    Threads
    62
    Credits
    31
    Thanked
    3

    Default

    Quote Zeeshanef said: View Post
    bhi hamare pas magic stick nahi ke usay ghumae, aor hamain aap ka code nazar aajaye.

    Pahle aap apna code share karain. Shukriya
    #include<conio.h>
    #include<graphics.h>
    Main()
    {
    Float ph,ch,om,per;
    Char n[10], fname[10];
    Int gd =DETECT,gm;
    Initgraph(&gd,&gm, "c:\\tc\\bgi";
    Setfillstyle(1,3);
    Bar(1,260,390,260);
    rectangle(1,1,550,390);
    Line(260,390,260,390);
    Cout<<"\n"<<"\t"<<"\t"<<"\ t"<<"name";
    Cout<<"\t"<<"\t"<<"\t";
    Cin>> n;
    Cout<<"\n"<<"\n"<<"\t"<<"\ t"<<"\t"<<" father name"
    cin>> fname;
    Cout<<"\n\t\t\tphysics";
    Cout<<"\t\t\t";
    Cin>> phy;
    Cout<<"\n\t\t\tchemistry";
    Cout<<"\t\t\t";
    Cin>>ch;
    Om=phy+ch;
    Per=om/200;
    If (per>=70);
    {
    Cout<<"\n\t\t\t grade a1";
    Cout<<"\t\t\t";
    }
    Else if (per>=70);
    {
    Cout<<"\n\t\t\t grade b";
    Cout<< "\t\t\t";
    }
    Else
    Cout <<"\n\t\t\tsorry";
    Cout<<"\t\t\t";
    getch();
    closegrpah();
    }

  8. #8
    sayhellotoit's Avatar
    sayhellotoit is offline Senior Member
    Last Online
    23rd September 2017 @ 07:51 PM
    Join Date
    01 May 2009
    Posts
    1,003
    Threads
    5
    Credits
    53
    Thanked
    127

    Default

    iostream.h include nahi ki
    float phy hona chahiyay kionkeh baqi sab jaga aap phy hi likh rahay ho.
    If aur Else if kay baad semicolon remove ker dain.
    200 ki jaga 2 per divide karain.

    Baqi code sahi chal raha hay.

    #include<conio.h>
    #include<iostream.h>
    #include<graphics.h>
    int main()
    {
    float phy,ch,om,per;
    char n[10], fname[10];
    int gd =DETECT,gm;
    initgraph(&gd,&gm, "C:\\TC\\BGI");
    setfillstyle(1,3);
    bar(1,260,390,260);
    rectangle(1,1,550,390);
    line(260,390,260,390);
    cout<<"\n"<<"\t"<<"\t"<<"\t"<<"name";
    cout<<"\t"<<"\t"<<"\t";
    cin>> n;
    cout<<"\n"<<"\n"<<"\t"<<"\t"<<" father name";
    cout<<"\t"<<"\t"<<"\t";
    cin>> fname;
    cout<<"\n\t\t\tphysics";
    cout<<"\t\t\t";
    cin>> phy;
    cout<<"\n\t\t\tchemistry";
    cout<<"\t\t";
    cin>>ch;
    om=phy+ch;
    per=om/2;
    if (per>=70)
    {
    cout<<"\n\t\t\t grade a1";
    cout<<"\t\t\t";
    }
    else if (per>=60)
    {
    cout<<"\n\t\t\t grade b";
    cout<< "\t\t\t";
    }
    else
    cout <<"\n\t\t\tsorry";
    cout<<"\t\t\t";
    getch();
    closegraph();
    return 1;
    }

  9. #9
    Zeeshanef's Avatar
    Zeeshanef is offline Advance Member
    Last Online
    28th December 2023 @ 02:18 PM
    Join Date
    30 Mar 2006
    Location
    Great Pakistan
    Gender
    Male
    Posts
    846
    Threads
    12
    Credits
    1,456
    Thanked
    46

    Default

    aapki logic mein zara problem thi is liye result nahi aaraha tha, bas aap ko is line mein: per=om/200; ko is tarhan karna he: per=om/200 * 100;
    kionke percentage to aisay hi nikalta he, (Number got / Total Number * 100)
    aor else if mein >=70 ki jaga >=60 karain ta ke B grade ka message bhi aasake.

    ye lijye complete code isay copy ker kain run ker ke dekhlain:

    Code:
    #include <iostream.h>
    #include <conio.h>
    #include <graphics.h>
    
    void main()
    {
    float phy,ch,om,per;
    char n[10], fname[10];
    int gd =DETECT,gm;
    initgraph(&gd,&gm, "c:\\tc\\bgi");
    setfillstyle(1,3);
    bar(1,260,390,260);
    rectangle(1,1,550,390);
    line(260,390,260,390);
    cout<<"\n"<<"\t"<<"\t"<<"\t"<<" name";
    cout<<"\t"<<"\t"<<"\t";
    cin>> n;
    cout<<"\n"<<"\n"<<"\t"<<"\t"<<"\t"<<" father name";
    cout<<"\t"<<"\t";
    cin >> fname;
    cout<<"\n\t\t\t physics";
    cout<<"\t\t";
    cin>> phy;
    cout<<"\n\t\t\t chemistry";
    cout<<"\t\t";
    cin>>ch;
    om=phy+ch;
    per=om/200 * 100;
    if (per>=70)
    {
    cout<<"\n\t\t\t grade a1";
    cout<<"\t\t\t";
    }
    else if (per>=60)
    {
    cout<<"\n\t\t\t grade b";
    cout<< "\t\t\t";
    }
    else
    cout <<"\n\t\t\t sorry";
    cout<<"\t\t\t";
    getch();
    closegraph();
    }

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •