1,105,409 Community Members

Programming

Member Avatar
Mz. Jackee
Newbie Poster
7 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

Member Avatar
abrarfaiyaztasin
Newbie Poster
1 post since Jan 2013
Reputation Points: 7 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 
#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.

Member Avatar
<M/>
Industrious Poster
4,473 posts since Apr 2012
Reputation Points: 106 [?]
Q&As Helped to Solve: 139 [?]
Skill Endorsements: 114 [?]
Featured
 
0
 

Why not share your code so we can help you with it? we are not doing your work...

Member Avatar
ddanbe
Posting Expert
5,341 posts since Oct 2008
Reputation Points: 2,054 [?]
Q&As Helped to Solve: 907 [?]
Skill Endorsements: 46 [?]
Featured
 
0
 

Why not learn something about division ande remainder operators in C#? Learn!

Member Avatar
tinstaafl
Postaholic
2,012 posts since Jun 2010
Reputation Points: 559 [?]
Q&As Helped to Solve: 402 [?]
Skill Endorsements: 35 [?]
 
0
 

Learning about the Timespan Structure would simplify what you need to do.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article