Interlace odd / even from A to B.
Two numbers A and B are passed as input. The program must print the odd numbers from A to B (inclusive of A and B) interlaced with the even numbers from B to A.
Input...
Showing posts with label c. Show all posts
Showing posts with label c. Show all posts
Monday, 9 October 2017
Saturday, 7 October 2017
Friday, 6 October 2017
Given a positive integer N as the input, the program must print yes if N is a perfect number. Else no must be printed.
Input Format:
The first line contains N.
Output Format:
The first line contains yes or no
Boundary Conditions:
1 <= N <= 999999
Example Input/Output 1:
Input:
6
Output:
yes
Example Input/Output 2:
Input:
8
Output:
no
Program:
#include<stdio.h>
#include...