+ 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!!!

20th Nov 2020, 9:49 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
16 odpowiedzi
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
20th Nov 2020, 11:21 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
+ 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); } }
20th Nov 2020, 9:59 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
+ 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 :)
20th Nov 2020, 11:23 PM
#Code
#Code - avatar
+ 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"); } }
22nd Nov 2020, 7:28 AM
nobleknight
nobleknight - avatar
0
thats all i could came up
20th Nov 2020, 10:00 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
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?
20th Nov 2020, 10:14 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
0
but study by yourself its very difficult,how long do learn C?
20th Nov 2020, 10:23 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
0
do you learn?*
20th Nov 2020, 10:26 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
0
ohh,cool ,I have been studied C around bit more than one month
20th Nov 2020, 10:28 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
0
could i write to you when sometimes I ‘ll get again confusing program ,help to you in practicing
20th Nov 2020, 10:32 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
0
oh noo😅,a bit about pointers my teacher was telling last class,I will be hear about it in the nearest future
20th Nov 2020, 10:39 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
0
ok 😅,i am always patient)
20th Nov 2020, 10:48 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
0
Hey I was wondering, are you a student too? If yes, where and what do you study :)
20th Nov 2020, 11:16 PM
#Code
#Code - avatar
0
youu too) how long are you in whole in area software???
20th Nov 2020, 11:26 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
0
i means ,years???
20th Nov 2020, 11:27 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar
- 1
in my brain it looks like this
20th Nov 2020, 10:00 PM
Aleks kryzhanivskyi
Aleks kryzhanivskyi - avatar