Can anyone help me please for some activity šŸ™šŸ» | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Can anyone help me please for some activity šŸ™šŸ»

1. Write a C program that print numbers From 1 to maximum number entered by the user. 2. Write a C program to sum all even number from 1 to a maximum number entered by the user. Hint: We call X is an even number if and only if the reminder of (X %2) is zero. 3. Write a C program to find the average of all odd numbers from 1 to a maximum number entered by user.

20th Oct 2018, 11:04 AM
Ghadi
Ghadi - avatar
11 Respostas
+ 2
we'll glad to help if you need :) but, do what you can first if you confuse about some part, or got an error and dont know how to fix you can ask here anytime, we'll answer if we can. it's learning platform after all
20th Oct 2018, 11:08 AM
Taste
Taste - avatar
0
Taste But I do not know how to start here šŸ’”
20th Oct 2018, 11:11 AM
Ghadi
Ghadi - avatar
0
D_Stark ohh thank you soo much i will write it now
20th Oct 2018, 11:13 AM
Ghadi
Ghadi - avatar
0
Taste #include<stido.h> int main() { int x; int maxNo; printf(ā€œEnter maximum number:ā€); scanf(ā€œ%dā€, &maxNo); for(x=1; x<= maxNo; x++); printf(ā€œ%dā€, x); return 0; } Where is the problem here?
20th Oct 2018, 11:41 AM
Ghadi
Ghadi - avatar
0
remove ; after for statement
20th Oct 2018, 11:46 AM
Taste
Taste - avatar
0
oh iā€™m sorry but i donā€™t write ; after for statement in my program šŸ˜… Taste
20th Oct 2018, 11:56 AM
Ghadi
Ghadi - avatar
0
for(x=1;x<=maxNo;x++); <-- here
20th Oct 2018, 12:00 PM
Taste
Taste - avatar
0
yes i know but i dont write it in my program iā€™m write program in my lab not in my phone Taste
20th Oct 2018, 12:02 PM
Ghadi
Ghadi - avatar
0
when iā€™m write the program her iā€™m forgot and write it but in my program i dont write it Taste
20th Oct 2018, 12:04 PM
Ghadi
Ghadi - avatar
0
so the task is print number 1 to n, where n is the input right ? other than typo in stdio and semicolon after for its all right, it should works perfectly. and dont forget to add space at the output
20th Oct 2018, 12:10 PM
Taste
Taste - avatar
0
Taste I solved the problem thanks
20th Oct 2018, 12:39 PM
Ghadi
Ghadi - avatar