Pages
News
Android
C
C ++
Java
Advanced Java
Cyber Security
HTML
CSS
Java Script
PHP
Tuesday, 30 June 2015
Program 2 : Write a program to print 1+1/2+1/3+1/4+ _ _ +1/N series.
#include <stdio.h>
void main()
{
int n,i;
printf("enter n=");
scanf("%d", &n);
printf("1");
for (i = 2; i <= n; i++)
{
Printf(" + 1 / % d", i);
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment