Pages

Showing posts with label or. Show all posts
Showing posts with label or. Show all posts

Friday, April 11, 2014

WHETHER A NUMBER IS PRIME NUMBER OR NOT USING FUNCTION

#include<stdio.h>
#include<conio.h>
int prime(int number)
{
int k,rem,flag;
flag=1;
k=2
while(k<=number-1)
{
rem=number%k;
if(rem==0)
{
flag=0;
break;
}
k++;
}
return(flag);
}
void main()
{
int number;
clrscr();
printf("Enter a number
");

scanf("%d",&number);
if(prime(number))
printf("%d is prime",number);
else
printf("%d is not prime",number);
getch();
}

OUTPUT
Enter a number
6
6 is not a prime number

Enter a number
7
7 is not a prime number

EXPLANATION
Function prime() is defined with one formal argument of int type and is made to return either 1 or 0.The purpose of the function is to take an integer number and find out whether the number is prime or not. If the number is prime, it returns 1.Otherwise it returns 0.
In the main(),an integer number is accepted into the variable n. A call is made to the function prime() by passing the value of n.Since the function the function returns either 1 or 0, the function call has been used as a conditional expression as if (prime(n)) in main().If prime(n) returns 1 then the number is displayed as prime. Otherwise, the number is displayed as not prime.    

Read More..

Saturday, March 15, 2014

This Is Not Good News For Obamacare Or The Nation

November 11, 2013 Reuters is reporting that:

Nov 11 (Reuters) - President Barack Obamas healthcare reform has reached only about 3 percent of its enrollment target for 2014 in 12 U.S. states where new online health insurancemarketplaces are mostly working smoothly, a report released on Monday said.

States with functioning exchanges have signed up 49,100 people compared with the 1.4 million people expected to be enrolled for 2014, according to the report by healthcare research and consultancy firm Avalere Health.
This is bad news for Obamacare because it means that those who signed up are likely to be ones who are older, with pre-existing conditions -- the ones who are expensive for the insurers to take care of.  The ones who are necessary to make the exchanges financial sound are people who are young people, and those without pre-existing conditions.  The net effect is likely to be a "death spiral" where insurers have to raise rates to cover expenses, which will drive even more prospective customers into deciding to pay the penalty instead.

This is bad news for the country as a whole, because the costs are going to be picked up by the federal government, I am quite sure.  I have given up any hope that the Republicans will be able to do anything useful with this.  The RNC seems more interested in electing Democrats than in electing conservative Republicans, and the TEA Party sorts are pretty much irrelevant to politics as a result.
Read More..