Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
write a program that add up all the odd integer bettuen 20 and 56 and print the result.
0
votes
asked
Apr 28, 2018
by
almshet
Please
log in
or register to answer this question.
1 Answer
0
votes
answered
Apr 29, 2018
by
Aditya Rao P
#include <stdio.h>
int main(void){
int sum=0;
for(int i=20;i<56;i++){
if(i%2==1){
sum=sum+i;}}
printf("sum=%d",sum);
}
Please
log in
or register to add a comment.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...