I can’t get this  Assignment ,please help guys! | SoloLearn: Learn to code for FREE!

+4

I can’t get this  Assignment ,please help guys!

Create a program in C that receives a natural number from the user and squares all even numbers from 1 to the entered number. console must look like this: enter the natural number: 8 square a pair numbers in range from 1 to 8: 2^2=4 4^2=16 6^2=36 maybe someone know how to do this one help!!!

16 Answers

New Answer

0

I study in Ukraine in the Polytechnical university on Metrology,cause i gor a free government’s place,but after 2 years will be speciality like robotics , I am freshman and I study language C in the first year

+2

 #include <stdio.h> #include <math.h> int main() { int i,a,pair; //for(int i =0;i>0;i+=2){ //for(int i =0;i!=0 ;i+=2) printf("enter the natural number:"); scanf("%d",&a); printf("square pair numbers in range from 1 to %d",a); for( i =0;i<a ;i+=2) if(i%2 == 0) pow(i) { printf("%d",pair); } }

+2

Oh that's great! Robotics is a very interesting choice. I was about 16 when I started learning C and C++. Although now I'm shifting to Python since it has got more to do with the field I'm interested in. Hope to see you do good! Have a good day :)

+2

#include <stdio.h> int main() { int i, a; printf("enter the natural number: \n"); scanf("%d",&a); printf("square a pair numbers in range from 1 to %d: \n", a); for( i=2; i<a; i+=2) { printf("%d^%d = %d", i, 2, (i*i)); printf("\n"); } }

0

0

oh man i dunno wha to tell about,thank you very much,A teacher gives hard assignment,and wanted that program look as short as possible,difficult things,I know only how works oparator, do you always work with C? and do you study somewhere?

0

but study by yourself its very difficult,how long do learn C?

0

0

ohh,cool ,I have been studied C around bit more than one month

0

could i write to you when sometimes I ‘ll get again confusing program ,help to you in practicing

0

oh noo😅,a bit about pointers my teacher was telling last class,I will be hear about it in the nearest future

0

ok 😅,i am always patient)

0

Hey I was wondering, are you a student too? If yes, where and what do you study :)

0

youu too) how long are you in whole in area software???

0

-1

in my brain it looks like this