Pages
(Move to ...)
Assignment
Synopsis
C
Graphics
Compiler
C#
DCN
DBMS
Discrete Math
DS
IT Fun
Java
Json
NIELIT
Notes
Office
OOPS
OS
PHP
Project
Phython
Question
SSAD
Web
UGC Net
VB
ASP
▼
Friday, 4 August 2017
Sum of series
#include
<stdio.h>
void
main()
{
int
i,j,k=0;
char
sym=
'+'
;
printf(
"Enter n>> "
);
scanf(
"%d"
,&i);
for
(j=1;j<i;j+=2)
{
sym=sym==
'+'
?
'-'
:
'+'
;
k+=j;
printf(
"%d %c "
,j,sym);
}
}
Download Source Code
Next Question
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment