Saturday, 5 October 2013

C++ pointers practice if that no is that then do that!! with the help of point

#include <iostream>
#include <fstream>
#include <stdlib.h>

using namespace std;

void main()
{
    int a,b;
    int *ptr;
    int result;
    cout<<"point checking program\n";
    cout<<"if first number is greater then second then ADD \n";
    cout<<"if second number is greater then first then ADD \n";

    cout<<"enter the two numbers:";
        cin>>a>>b;
        if(a>b)
        {
            result = a+b;
            ptr=&result;
        }
        else if(a<b)
        {
            result = a-b;
        ptr = &result;
        }
        else
        {
            cout<<"wrong answer";
        }
        cout<<"value of the result is "<<result;
        cin>>result;
}


c++ Counting Table in which u set limit where to count

#include <iostream>

using namespace std;
int main () {
    int x,a,m;
    cout<<"number for the table to count"<<endl; cin>>a;
    cout<<"pleas enter the limit for upto table to print"<<endl;
    cin>>m;
    for(int i =1;i<=m;i++)
    {
        cout<<a<<" X "<<i<<" = "<<a*i<<endl;
    }
    cout<<endl<<"XXXXXXXXXXXXXXXXXX"<<endl;
}


Saturday, 14 September 2013

NO MORE ON BLOGGER

NOTICE


GUYS,
 http://programmingisbest.blogspot.com
is no more all data is automatically transfer to my latest blog

link of new site will be posted soon

stay tuned!!

 
Sorry for the change of link

Regards

Umar Javed
umar@hashmisaf.com

Monday, 10 June 2013

Thank You bloggers

Hi Friends Thank You For seeing my Blog spot programs kindly follow me at twitter for any suggestions


website www.twitter.com/@umarjavedmalik


Kindly write programs Yourself , if You Copy paste my code its Against the Copyrights Laws and plagiarism factorz!!



My another blog Link is :- www.csharpisbest.blogspot.com
is another of mine blog..

Regards

Umar Javed Malik
umarjaved01@gmail.com

Tuesday, 21 May 2013

C++ Subject Grading Policy in University



#include<iostream.h>
void main()
{
int q1,q2,q3,q4,q5,q6; int A1,A2,A3,A4,A5;
int *ptr;
{
    cout<<"\nxxxxQuizzesxxxx";
//best quizzes situation choose best of the 4
cout<<"\nEnter the 5 quizzes marks  = ";
cin>>q1>>q2>>q3>>q4>>q5;
{
    if(q1<q2 && q1<q3 && q1<q4 && q1<q5)
        {
        q6=q2+q3+q4+q5;
        ptr=&q6;
        }
    else if(q2<q1 && q2<q3 && q2<q4 && q2<q5)
        {
        q6=q1+q3+q4+q5;
        ptr=&q6;
        }
    else if(q3<q1 && q3<q2 && q3<q4 && q3<q5)
        {
        q6 = q1+q2+q4+q5;
        ptr = &q6;
        }
  else if(q4<q1 && q4<q2 && q4<q3 && q4<q5)
        {
        q6 = q1+q2+q3+q5;
        ptr = &q6;
        }
  else if(q5<q1 && q5<q2 && q5<q4 && q5<q3)
        {
        q6 = q1+q2+q3+q4;
        ptr = &q6;
        }
 }
    cout<<"\n best of the 4 quizzes marks are as under = "<<q6;
 }
 {

    {
     cout<<"\nxxxxAssignemntsxxxx";
    //best Assignemts situation choose best of the 4
    cout<<"\n\nEnter the 4 Assignments marks are = ";
    cin>>A1>>A2>>A3>>A4;
    {
        if(A1<A2 && A1<A3 && A1<A4)
        {
        A5=A2+A3+A4;
        ptr=&A5;
        }
        else if(A2<A1 && A2<A3 && A2<A4 )
        {
        A5=A1+A3+A4;
        ptr=&A5;
        }
        else if(A3<A1 && A3<A2 && A3<A4)
        {
        A5 = A1+A2+A4;
        ptr = &A5;
        }
        else if(A4<A1 && A4<A2 && A4<A3)
        {
        A5 = A1+A2+A3;
        ptr = &A5;
        }

    }
    cout<<"\n best of the 3 Assignents  marks are as under = "<<A5;
    }

    //to get the 20% weightage
    q6 = (q6/2);

     // to gett the 10% weigtage of the assignments then
     A5 = (A5/3);
    }

    cout<<"\nSo the average best of against the 10% of assignment is  = "<< A5;
    cout<<"\nSo the average best of against the 20% of Quizes is  = "<< q6;

    float mid;
    float final;

    cout<<"\nxxxxMid Teremxxxx";
    cout<<"\nPlease Enter the mid term marks = "; cin>>mid;
    cout<<"\nxxxxFinal Termxxxx";
    cout<<"\nPlease Enter the Final term marks = "; cin>>final;

    cout<<"\nxxxxCalculationsxxxx";
    float totl=A5+q6+mid+final;
    cout<<"\n\nYour Total Marks in subject are as under = "<<totl;

    if(totl>=86 && totl<=100){cout<<"You got A grade";}
    else if(totl>=78 && totl<=85){cout<<"You got B+ grade";}
    else if(totl>=72 && totl<=77){cout<<"You got B grade";}
    else if(totl>=66 && totl<=71){cout<<"You got C+ grade";}
    else if(totl>=60 && totl<=65){cout<<"You got C grade";}
    else if(totl>=50 && totl<=60){cout<<"You got C grade";}
    else if(totl>=0 && totl<=49){cout<<"You are Fail ";}
    else{cout<<"\nWrong marks result error ,try again thnx ";}
}