Tuesday, 17 December 2013

C++ Calculate Total days in Year by Input only February days in current year or else year

#include<iostream.h>
#include<conio.h>

void main()
{
int months[11]={31,31,30,31,30,31,31,30,31,30,31};
int fab;
cout<<"How much Days in Fab this year = "; cin>>fab;
int i=0;
int *ptr;
while(i<=11)
{
 fab=fab+months[i];
 ptr=&fab;
 i++;
}
cout<<"total Days this Year Will be = "<<fab;
getch();
}

output :-

Friday, 13 December 2013

C++ Assignment For Air University Student



CS-161 Computer Programming— Fall 2013

BEE                                                    Assignment # 03                                     5th Dec, 2013

                                                Submission Date: 12th Dec, 2013
_____________________________________________________________________________

Q#1   Write a program to keep record of employees personal and payroll information in structure. You should take information of employee name, address, id, served years, and for how many hours he works per day and hourly rate. Think yourself if it needs some nested structure or simple structure. You are required to calculate monthly salary of all 30 employees. Add 20% of salary increment if an employee has over 2 years of experience.

Instructions:

         Do not copy paste
         Submit in hard copy in start of lab
         Copied assignments will be marked Zero
         Total Marks 10
         Late assignment will not be considered




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