Question
need a program that translates seconds into anything it has to look like this at the bottom . class is visual C# and if you can help with the program and also the button and labels used would be helpful
11:53 vil LTE ID Assignment-4-B.PNG m4_11.Form! components Program4_12 Enter a number of seconds 365 Calculate ainer co 6 min
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Note: As the question is asking help with the labels and buttons on the form, we need to provide a link to download the complete project as below.

Please download the complete project solution from the link below:

https://www.dropbox.com/s/d54v249gdwtjg9z/SecondsToMinutes.zip?dl=0

Please find the code as below:

2 using System; using System.Windows.Forms; namespace Seconds ToMinutes { 3 references public partial class FrmSecondsToMinut

if (seconds > 0) int minutes = seconds / 60; //This gives the minutes from the seconds int remainingSeconds = seconds % 60; /

using System;
using System.Windows.Forms;

namespace SecondsToMinutes
{
public partial class FrmSecondsToMinutes : Form
{
public FrmSecondsToMinutes()
{
InitializeComponent();
}

private void btnCalculate_Click(object sender, EventArgs e)
{
int seconds = 0;
try
{
seconds = int.Parse(tbSeconds.Text);
}
catch (Exception ex)
{
MessageBox.Show("Invalid Input! Please try again!");
tbSeconds.Text = "";
}

if (seconds > 0)
{
int minutes = seconds / 60; //This gives the minutes from the seconds
int remainingSeconds = seconds % 60; //This gives the seconds left after dividing the seconds with 60
tbResult.Text = String.Format("{0} minutes {1} seconds", minutes, remainingSeconds);
}
}
}
}

OUTPUT

o Program4_12 - O X Enter a number of seconds: 365 Calculate 6 minutes 5 seconds

. Program4_12 - O X Enter a number of seconds: 59 Calculate O minutes 59 seconds

Add a comment
Know the answer?
Add Answer to:
need a program that translates seconds into anything it has to look like this at the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need help with this assignment in C++, please! *** The instructions and programming style detai...

    I need help with this assignment in C++, please! *** The instructions and programming style details are crucial for this assignment! Goal: Your assignment is to write a C+ program to read in a list of phone call records from a file, and output them in a more user-friendly format to the standard output (cout). In so doing, you will practice using the ifstream class, I'O manipulators, and the string class. File format: Here is an example of a file...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT