problem here

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Raja Ahsan Saleem
    New Member
    • May 2007
    • 7

    problem here

    Create a notepad file named number.txt which consists of int type numbers separated with new lines on your hard disk. Write a program which read the numbers form this file and show them to screen, also display the total numbers in files and largest and smallest numbers to the screen.
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Hi,
    Basiaclly u ant to write a code to read the info from file using fgets and then sscanf to read the number and print it using printf.

    Have u tried anything on this?
    Tell us where r u stuck.?

    Raghuram

    Comment

    • ahammad
      New Member
      • May 2007
      • 79

      #3
      I love how they copy and paste the assignment/homework question as is...

      Comment

      • Silent1Mezzo
        New Member
        • Feb 2007
        • 208

        #4
        Originally posted by ahammad
        I love how they copy and paste the assignment/homework question as is...
        It's because they've left the work too long. Then they think that we'll just give them the code and they won't have to worry about it.

        Comment

        • Savage
          Recognized Expert Top Contributor
          • Feb 2007
          • 1759

          #5
          Originally posted by Silent1Mezzo
          It's because they've left the work too long. Then they think that we'll just give them the code and they won't have to worry about it.
          Agreed.

          I guess that they must first feel it on their own skin.

          That way they will learn a good lesson

          Savage

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by ahammad
            I love how they copy and paste the assignment/homework question as is...
            Especially the demanding tense of the verbs in it: "do this, do that". It especially
            doesn't make sense for the third person folks reading this here in this forum.
            The only reaction it brings up for me is: "do it yourself and be a bit more polite
            next time you show up here" ;-)

            kind regards,

            Jos

            Comment

            • AdrianH
              Recognized Expert Top Contributor
              • Feb 2007
              • 1251

              #7
              We should slap them around like they are doing to us.
              ............... .__.(__)..__
              ............... (__)l.....l(__)
              ............... l.=.ll..=.ll.=. l.__
              ............... l....ll.....ll. ...l(__)
              ............... l.=.ll=.=ll.=.l l.=.l
              ............... .l....ll.....ll ....ll....l
              .....__......l. =.ll=.=ll.=.ll. =.l
              ....l]...\.....l..... ............ll. =.l
              ......l.....\.. ..l............ .........l
              ......(.....(_/............... ........l
              ......(........ ............... ..........l
              ......(........ ............... ..........l
              ........ ............... .............../
              ............ _.............. ........./
              ............... l.............. .......l
              SLAP! SLAP!

              :D

              (Got that from Facebook.)

              Just a little courtesy is all we ask.

              Adrian

              Comment

              • Savage
                Recognized Expert Top Contributor
                • Feb 2007
                • 1759

                #8
                Originally posted by AdrianH
                We should slap them around like they are doing to us.
                ............... .__.(__)..__
                ............... (__)l.....l(__)
                ............... l.=.ll..=.ll.=. l.__
                ............... l....ll.....ll. ...l(__)
                ............... l.=.ll=.=ll.=.l l.=.l
                ............... .l....ll.....ll ....ll....l
                .....__......l. =.ll=.=ll.=.ll. =.l
                ....l]...\.....l..... ............ll. =.l
                ......l.....\.. ..l............ .........l
                ......(.....(_/............... ........l
                ......(........ ............... ..........l
                ......(........ ............... ..........l
                ........ ............... .............../
                ............ _.............. ........./
                ............... l.............. .......l
                SLAP! SLAP!

                :D

                (Got that from Facebook.)

                Just a little courtesy is all we ask.

                Adrian

                LOL

                Savage

                Comment

                • Silent1Mezzo
                  New Member
                  • Feb 2007
                  • 208

                  #9
                  Originally posted by AdrianH
                  We should slap them around like they are doing to us.
                  ............... .__.(__)..__
                  ............... (__)l.....l(__)
                  ............... l.=.ll..=.ll.=. l.__
                  ............... l....ll.....ll. ...l(__)
                  ............... l.=.ll=.=ll.=.l l.=.l
                  ............... .l....ll.....ll ....ll....l
                  .....__......l. =.ll=.=ll.=.ll. =.l
                  ....l]...\.....l..... ............ll. =.l
                  ......l.....\.. ..l............ .........l
                  ......(.....(_/............... ........l
                  ......(........ ............... ..........l
                  ......(........ ............... ..........l
                  ........ ............... .............../
                  ............ _.............. ........./
                  ............... l.............. .......l
                  SLAP! SLAP!

                  :D

                  (Got that from Facebook.)

                  Just a little courtesy is all we ask.

                  Adrian
                  Reminds me of the movie "The Master of Disguise" with Dana Carvey.

                  Comment

                  • Savage
                    Recognized Expert Top Contributor
                    • Feb 2007
                    • 1759

                    #10
                    Originally posted by Silent1Mezzo
                    Reminds me of the movie "The Master of Disguise" with Dana Carvey.
                    Hmmm,u are right.

                    Savage

                    Comment

                    • AdrianH
                      Recognized Expert Top Contributor
                      • Feb 2007
                      • 1251

                      #11
                      Originally posted by Silent1Mezzo
                      Reminds me of the movie "The Master of Disguise" with Dana Carvey.
                      Hmm, gotta go look that one up at imdb.


                      Adrian

                      Comment

                      • Silent1Mezzo
                        New Member
                        • Feb 2007
                        • 208

                        #12
                        Originally posted by AdrianH
                        Hmm, gotta go look that one up at imdb.


                        Adrian
                        Ya, its a fairly dumb movie....I wish I didn't know it :P

                        Comment

                        • AdrianH
                          Recognized Expert Top Contributor
                          • Feb 2007
                          • 1251

                          #13
                          Originally posted by Silent1Mezzo
                          Ya, its a fairly dumb movie....I wish I didn't know it :P
                          Looks kinda funny.


                          Adrian

                          Comment

                          Working...