#include<stdio.h>
#include<math.h>
int main()
{
int n,nstart,nstop,nstep,i,j,zNumber;
`
printf("Please enter a value of a positive integer nstart: ");
scanf("%d",&nstart);
printf("Please enter a value of a positive integer nstop: ");
scanf("%d",&nstop);
printf("Please enter a value of a positive integer nstep: ");
scanf("%d",&nstep);
printf("Number\t\tzNumber\n");
printf("------\t\t-------\n");
n=nstart;
zNumber= double pow(double_n,double_i);
while(i<=nstop){
zNumber = 1;
i=1;
while(i<=n){
zNumber +=i;
i++;
}
printf("%d\t\t%d\n",n,zNumber);
n += nstep;
}
return 0;
}
cnsk90
0
Newbie Poster
Recommended Answers
Jump to PostDo you have a query?
Include problem and errors, as well as any questions.
Jump to PostA first step to coding a solution to any problem is a clear understanding (and statement) of the problem.
What is the expected input (validate input to make sure ok.)
What is the desired output (is the program to loop for more input, if invalid ... or to loop again.)
…
Jump to Post... only a few ?
Coding can really be fun ... once one knows what to do :)
It may take quit a while ... for that to happen !
Writing lots of code and trying it out until one sees what each part does ... that's the way to …
All 9 Replies
Suzie999
245
Coding Hobbyist
David W
131
Practically a Posting Shark
cnsk90
0
Newbie Poster
cnsk90
0
Newbie Poster
David W
131
Practically a Posting Shark
cnsk90
0
Newbie Poster
David W
131
Practically a Posting Shark
cnsk90
0
Newbie Poster
David W
131
Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.