Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29
  1. #11

    ahh i see.. unsa pud na condition sa loop ako ibutang ana ? i mean, mausab nasad to katong 1st nako na condition sa codes ?..

  2. #12
    Sorry if I put on the code directly. But I got it in 3 minutes and 31 seconds:

    Code:
    #include <stdio.h>
    
    int main() {
        int i, j;
    
        for(i = 0; i < 12; ++i) {
            j = i < 7 ? i : 12 - i;
            while(j--) {
                printf("*");
            }
            printf("\n");
        }
    
        return 0;
    }
    Please ask if naa kay kalibgan ani. It's bad to simply copy and paste other's work to finish your assignment. Trust me.

  3. #13
    Quote Originally Posted by jc_teraku View Post
    possible na sya. though its a bit more complicated. one way of doing it is using d gotoxy() na function.
    this function lets your cursor (the blinking underscore) jump to a coordinate in your monitor.
    coz if you dnt use that, kelangan pa ka ug another printf to put some spaces.
    A bad practice. gotoxy works only on non-standard compilers and only works on Borland-based compilers.

  4. #14
    Quote Originally Posted by neigyl_noval View Post
    A bad practice. gotoxy works only on non-standard compilers and only works on Borland-based compilers.
    +1

    Quote Originally Posted by neigyl_noval
    Please ask if naa kay kalibgan ani. It's bad to simply copy and paste other's work to finish your assignment. Trust me.
    Truth.

    Also, given the context of this assignment. Don't think they've tackled ternary operators, yet. Duda ko IT10 ni sa San Carlos. Kay hapit na mahuman ang sem, nya mao pay gipang discuss. =P

  5. #15
    @noval : thank you.. unsa pasabot ani na line ? { j = i < 7 ? i : 12 - i; <-- karon pako ani.. pero ni work jud xa..

  6. #16
    mag ask lang unta ko if unsa paagi nga maporma xag diamond nga isa ra ka printf("*") ang gamiton.. tnx..

  7. #17
    @public7enemy wala nmn lng kay gbuhat pra sa imo assignment brader. wla mn lang gani ka nag research. i.google na oi. sure ko, wa pd nmu basaha ako post. kay ako jd gi post unsay tawag anang j = i < 7 ? i : 12 - i;

    Believe me, brader. That's now how you wanna learn(if what you're trying is actually learn).

    Ang kani na problem set kay, supposedly, mka pa exercise sa imo algorithm ug logic skills. Para ma enhance imo understanding sa use sa functions involved ug pra ma-anad kag solving algorithms.

    The least you could do is post the things that you've tried, your research, sample code.

    Post specific questions, kay so far, imo mga problem sets gpang post dri kay similar ra kaayo. Obviously, wala kay na kat-onan sa previous problems kay puro rmn ka pangutana. Wala nmu susiha ang mga solution na gpang hatag.

    Now, I'm sure, ayos ra kaayo ni sila mutabang nmu. Makalingaw mn pd mag himo2x ug mga in-ani na simple programs. Pero, ug imo huna-huna-on. Ang imo ra nakuha nila kay maayo nga score pra sa imo homework, wla ka nakat-on ug program.

    Anyway, mra nkog tiguwang nangasab dri. Sayang lng gd, kay nihit kau mga maayo nga programmer dri Cebu, dli pajd mag kat-on ang nagskwela karon.

    tl;dr
    Pagkat-on. Ayaw pag cge pangutana. Patabang ug ma stuck up jd kaayo ka.

    /rant

  8. #18
    Quote Originally Posted by kamahak View Post
    +1


    Truth.

    Also, given the context of this assignment. Don't think they've tackled ternary operators, yet. Duda ko IT10 ni sa San Carlos. Kay hapit na mahuman ang sem, nya mao pay gipang discuss. =P
    Better learn those stuffs at an early course. I guess 2nd year ni si TS. CompE or IT or CS. If you're CompE, you should learn advanced programming like Hardware level programming earlier.


    Quote Originally Posted by public7enemy View Post
    @noval : thank you.. unsa pasabot ani na line ? { j = i < 7 ? i : 12 - i; <-- karon pako ani.. pero ni work jud xa..


    Ternary operators. That line is equivalent to:

    Code:
    if(i < 7) {
         j = i;
    } else {
         j = 12 - 1;
    }

  9. #19
    Quote Originally Posted by public7enemy View Post
    mag ask lang unta ko if unsa paagi nga maporma xag diamond nga isa ra ka printf("*") ang gamiton.. tnx..

    Everyone, do not solve this problem. TS, try it on your own.

    Kabaw naka unsaon pag-himu og triangle nga pinakilid. Ikaw nay bahala sa diamond. Naa na kay clues.

  10. #20
    Quote Originally Posted by noval
    Better learn those stuffs at an early course. I guess 2nd year ni si TS. CompE or IT or CS. If you're CompE, you should learn advanced programming like Hardware level programming earlier.
    Agreed. You should learn as much as you can early on. Especially the fundamentals.

  11.    Advertisement

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

 
  1. Skin and Fur Problems for Dogs~
    By chanbri in forum Pet Discussions
    Replies: 228
    Last Post: 07-31-2011, 07:00 AM
  2. Anyone here having no internet problems for 2 weeks? (PLDT)
    By pinkchocobo in forum Networking & Internet
    Replies: 3
    Last Post: 09-23-2010, 05:51 PM
  3. for loop problem
    By istoryansucks in forum Programming
    Replies: 2
    Last Post: 08-08-2010, 04:15 AM
  4. Replies: 20
    Last Post: 12-02-2009, 10:56 PM
  5. Compatible ink problem for Epson C63
    By KittyAnnette in forum Computer Hardware
    Replies: 13
    Last Post: 02-18-2006, 03:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top