for loop problem

Zeddy

Zeddy

@zeddy-A4vi8j Oct 13, 2024
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

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • simplycoder

    simplycoder

    @simplycoder-NsBEdD Aug 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.