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

# www.vustudents.ning.com

 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

# cs304 assignment solution. please understand it,, it is just food for thought

#include
using namespace std;

class Time
{
public:
Time()
{
hour = 00;
minute = 00;
seconds = 00;
}
void setTime(int h, int m, int s)
{
hour = h;
minute = m;
seconds = s;
}
void show12Hour()
{
int h, m, s;
h = hour;
m = minute;
s = seconds;
if(h>12 && h<24 && m>=00 && m<60 && s>=00 && s<60) { h -= 12; cout":"m":"s" pm"endl;="" }="" else="" if="" (h="">12 && h<24 && m >59 && s >= 00 && s < 60)
{
h -= 12;
m = 00;
cout":"m":"s" pm"endl;="" }="" else="" if="" (h="">12 && h < 24 && m >=00 && m <60 && s >59)
{
h -= 12;
s =00;
cout":"m":"s" pm"endl;="" }="" else="" if="" (h="">12 && h < 24 && m >59 && s >59)
{
h -= 12;
s =00;
m =00;
cout":"m":"s" pm"endl;="" }="" else="" if="" (h="">=01 && h<=12 && m>=00 && m <60 && s >=00 && s<60) { cout":"m":"s" am"endl;="" }="" else="" if="" (h="">= 01 && h <= 12 && m >59 && s >= 00 && s < 60)
{
m =00;
cout":"m":"s" am"endl;="" }="" else="" if="" (h="">= 01 && h <= 12 && m >=00 && m <60 && s >59)
{
s =00;
cout":"m":"s" am"endl;="" }="" else="" if="" (h="">= 01 && h <= 12 && m >59 && s >59)
{
m=00;
s=00;
cout":"m":"s" am"endl;="" }="" else="" if="" ((h="" <="0" ||="" h=""> 24) && m >59 && s >59)
{
h = 12;
m =00;
s = 00;
cout":"m":"s" am"endl;="" }="" else="" if="" ((h="" <="0" ||="" h=""> 24) && m <60 && s >59)
{
h = 12;
s = 00;
cout":"m":"s" am"endl;="" }="" else="" if="" ((h="" <="0" ||="" h=""> 24) && m >59 && s<60) { h = 12; m = 00; cout":"m":"s" am"endl;="" }="" else="" if="" ((h="" <="0" ||="" h=""> 24) && m >59 && s>59)
{
h = 12;
m = 00;
s = 00;
cout":"m":"s" am"endl;="" }="" else="" if="" (h="" <="0" &&="" m="" s="" {="" h="12;" couth":"m":"s"="" void="" show24hour()="" int="" h,="" m;="" if(h="""> 24)
{
h = 00;
}
if(m > 59)
{
m = 00;
}
if (h < 01 && m < 01 )
{
h = 00;
m = 00;
}
cout/p>

+ 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?

Views: 1368

.

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

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

### Replies to This Discussion

file

Attachments:

Zeeshan Brother me jab bi C++ me compiling start kerta hon ye aik error show kerta he ke ap ke windows me problem he sahi se nahic hal raha..

Plz is ka koi hal he brother

Dear Fellows,

All of you are requested, Please post Only One Discussion for Current Assignment/GDB/Online Quiz and everyone reply/share/discussed his/her data on that same discussion, so that all members get solution & discuss easily on Current Assignment/GDB/Online Quiz.

So please don’t post two or more discussions for one Current Assignment/GDB/Online Quiz, hope you’ll understand and cooperate with us.