adspace
Write a c code segment using a for loop that calculates and
prints the sum of the even integers from 2 to 30, inclusive?
Answer Posted / parekh nirav
#include<stdio.h>
#include<conio.h>
void main()
{
int i,no,sum=0;
clrscr();
printf("\n entre the no:-");
scanf("%d",&no);
for(i=2;i<=30;i+1)
{
printf("\n the list is %d",i);
sum=sum+i;
}
printf("\n the sum is %d",sum);
getch();
}
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
write a c program to find the sum of five entered numbers using an array named number
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What is the general form of a C program?
What is the difference between union and anonymous union?
What is pointers in c with example?
Differentiate between null and void pointers.
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
develop algorithms to add polynomials (i) in one variable
write a progrmm in c language take user interface generate table using for loop?
will u please send me the placement papers to my mail???????????????????
What is variable initialization and why is it important?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
ATM machine and railway reservation class/object diagram
What are compound statements?