We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Correct and Final Solution of Assignment No.4 Of CS201 Due Date 28 Jan 2013 Solved by Waqas Rasheed

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 2658

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

1. C program or source code for find area of trapezium
2. How to calculate area of trapezium in c programming language


#include <stdio.h>
int main(){
float height,base1,base2;
float area;
printf("Enter the height of the trapezium: ");
scanf("%f%",&height);
printf("Enter length of lower base of the trapezium: ");
scanf("%f%",&base1);
printf("Enter length of upper base of the trapezium: ");
scanf("%f%",&base2);
area = 0.5 * (base1 + base2) * height;
printf("Area of trapezium is: %f",area);
return 0;
}

Now all details and relent material of this is assignment is here....

Now just read objectives of this assignment 

  • Objects and Classes
  • Constructors and Destructors in classes
  • Setters and Getters in classes
  • Use of friend functions
  • Operator overloading

 and read 

C program for find area of trapezium

and prepare assignment according to requirements...................

Enjoy

galti ho gai ya subject repet lay kr :(

Trapezium is a quadrilateral with two parallel sides. The Area of a trapezium is equal to the average length of the two parallel side multiply by the height.

figure 

In this example you will learn how to create an application from a given formula and write a simple program that will accept input or data from the user.

Code

#include <iostream> 
using namespace std;

int main() 
{ 
    int parallelsidea; 
    int parallelsideb; 
    int height; 
    int Area;

    cout  "Enter the length of the first parallel side: "; 
    cin >> parallelsidea;

    cout endl  "Enter the length of the second parallel side: "; 
    cin >> parallelsideb;

    cout endl  "Enter the height: "; 
    cin >> height;

    Area = (parallelsidea + parallelsideb) / 2 * height;

    cout endl  "Area of the Trapezoid: "  Area endl;        
    system("pause");

    return 0;

}

Q.As in assignmment 

"

  • Implement a default constructor to initialize all data members with zero and a parameterized constructor which takes three arguments to initialize data members of class.
  • Take input from user for base1, base2 and height of 2 objects."
So
why we have to declare two constructor as one is enough. and is we have to create two objects using new operator?
ANSWER:
As instructed in the assignment, you have to implement a parameterized constructor as well with a default constructor. 
Moreover it is up to you to create objects with new operator or you simply declare two objects of the given class. 
It is not necessary to use new operator.

ya sab kia ha???

Sabaq.........!

Function mea program kesy likha jata hy?????

ANSWER:

Following is a simple program that adds two integers using a function named addition. We pass both numbers as arguments to the function and the function performs the addition. 

#include <iostream.h>
using namespace std;
 int addition (int a, int b) 

int r; 
r=a+b; 
return (r); 


int main () 

int z; 
z = addition (5,3); 
cout "The result is " z; 
return 0; 
}

waqas bhai itnay error niklay hain

send me file

Ha Ha ha ha,  Rock sahb ap ne to assignment ki khaal hi utar k rakh di.

wese I think Waqas bhai ka code ok he ap s koi mistake hui ho gi.

mai ne compile kar k dekha d hai output ab ye sab dekh k b theek nahi likhtey...

to kya karen

RSS

Today Top Members 

© 2020   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.