BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

Register FAQ Community Calendar New Posts Navbar Right Corner
HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan > Institute of Computing > Bachelor of Science in Information Technology > BsIT 3rd Semester > Object Oriented Programming

Object Oriented Programming By Mam Sidra Malik


 
 
Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-09-2008, 11:06 PM
.BZU.'s Avatar


 
Join Date: Sep 2007
Location: near Govt College of Science Multan Pakistan
Posts: 9,693
Contact Number: Removed
Program / Discipline: BSIT
Class Roll Number: 07-15
.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute
Heart Assignment} Exercise#4 Question 9 and 11

Chapter # 4: Exercise Pages# 159 Question Number 9
Book
Object Oriented Programming by Robert Lafore
Code:
#include <iostream>
using namespace std;

struct time  // a strcuture time defined 
    {
    int hours;  // hours in time
    int minutes;  // minutes in time 
    int seconds;  // seconds in time
    };
int main()
{
    int totalsecs;
    time var_time;
    cout<<"Please enter the hours = ";
    cin>>var_time.hours;
    cout<<"Please enter the mintues = ";
    cin>>var_time.minutes;
    cout<<"Please enter the seconds = ";
    cin>>var_time.seconds;
    
    totalsecs = var_time.hours*3600+var_time.minutes*60+var_time.seconds;
    cout<<"total sconds of the given time are calculated as = "<<totalsecs<<endl;
return 0;
}

Here is the result:


__________________
(¯`v´¯)
`*.¸.*`

¸.*´¸.*´¨) ¸.*´¨)
(¸.*´ (¸.
Bzu Forum

Don't cry because it's over, smile because it happened
Reply With Quote
 

Tags
assignment, c++, exercise#4, question


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pathan Exercise thecool Funny/Comedy 0 30-08-2010 08:29 AM
Brain Exercise usman_latif_ch Chit Chat 0 11-04-2009 07:55 AM
Assignment Questions from Exercise:6 .BZU. Object Oriented Programming 5 25-09-2008 03:42 PM
Exercise of Chapter # 7 .BZU. Web Development 3 02-12-2007 02:22 PM
Assignment#4 Model for webdevelopment assignment .BZU. Web Development 2 18-11-2007 06:49 PM

Best view in Firefox
Almuslimeen.info | BZU Multan | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 03:14 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.