1.11M Members

Programming

 
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.

 
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.

 
0
 

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

 
0
 

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

 
0
 

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

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