Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. rookie question

rookie question

Scheduled Pinned Locked Moved Managed C++/CLI
question
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Binary0110
    wrote on last edited by
    #1

    I have this program I have to write for school that accepts two integers. hours and minutes. I then have to output the format in 6:00 format. I'm only allowed integer division and and modulus division. I've tried everything I can think of but my output still looks like this. 6:0 Any tips? BINARY -- modified at 23:40 Saturday 22nd October, 2005

    T C 2 Replies Last reply
    0
    • B Binary0110

      I have this program I have to write for school that accepts two integers. hours and minutes. I then have to output the format in 6:00 format. I'm only allowed integer division and and modulus division. I've tried everything I can think of but my output still looks like this. 6:0 Any tips? BINARY -- modified at 23:40 Saturday 22nd October, 2005

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      how do you print it ? using printf("%2d", minutes); would help...


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      1 Reply Last reply
      0
      • B Binary0110

        I have this program I have to write for school that accepts two integers. hours and minutes. I then have to output the format in 6:00 format. I'm only allowed integer division and and modulus division. I've tried everything I can think of but my output still looks like this. 6:0 Any tips? BINARY -- modified at 23:40 Saturday 22nd October, 2005

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        That sucks - you have to either use some relatively advanced C++ stuff in iostreams, or use C ( i.e. use printf ). Christian Graus - Microsoft MVP - C++

        T 1 Reply Last reply
        0
        • C Christian Graus

          That sucks - you have to either use some relatively advanced C++ stuff in iostreams, or use C ( i.e. use printf ). Christian Graus - Microsoft MVP - C++

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          Christian Graus wrote:

          That sucks

          it was only a suggestion. i never said to use it and nothing else...


          TOXCCT >>> GEII power
          [toxcct][VisualCalc]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups