I need help writing a program that declares a minutes variable to represent minutes worked on a job, and assign a value to it. Display the value in hours and minutes. For example, 197 minutes becomes 3 hours and 17 minutes. Unfortunately, I don't know much about programming...so, any information would be helpful.
Mz. Jackee
0
Newbie Poster
Recommended Answers
Jump to Post#include<stdio.h> int main() { int a,b,c; printf("minutes:"); scanf("%d",&a); printf("%d hour %d minutes",a/60,a%60); return 0; }
this is the C program to do your job.
All 4 Replies
abrarfaiyaztasin
7
Newbie Poster
Mike Askew
commented:
Not C#
-1
Ketsuekiame
commented:
I like the irony of giving him an answer he can't use. It is also correct and the poster did ask for *any* information. I would therefore add that this poster did indeed answer the op's question as it was asked.
+8
<M/>
170
Why so serious?
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
tinstaafl
1,176
Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.