CrazyEngineers
  • Zeddy
    Zeddy

    MemberAug 25, 2011

    for loop problem

    hey guys, I'm not that good in programming, can you help me to answer this?


    1. Write a program to list the numbers from 0-25, their squares, 3rd power, and 4th power.

    2. Write a program that reads in a number N and then outputs the sum from 1 to N.
    if the input is 3, the output should be 14 because 1^2+2^2+3^2=1+4+9=14


    I need it right, please for those expert on this kindly attache the source code.
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • simplycoder

    MemberAug 25, 2011

    @Zeddy: Kindly show us your work even if you think you are not good in programing, you should have atleast worked out something just show it to us even if its by paper and pencil.
    Please donot ask for ready made programs.
    As of your problem, its very simple dealing with control structures, understand how for loop works.
    According to me, the first you should code for finding square of any number, later on go for the above program.

    Show us your work and then only we can help you out, just by writing a code, you won't learn a thing. Trust me, there is huge difference in understanding a code and writing it by self.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register