Pages

Showing posts with label is. Show all posts
Showing posts with label is. 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..

Thursday, March 6, 2014

What is wrong with the world

http://www.cbc.ca/news/canada/story/2012/11/27/marketplace-flame-retardants.html?cmp=rss

image

That article has some really scary news: Manufacturers are using flame-retardant chemicals in the foam padding of a lot of furniture, office and home, that (a) does not work(!) and (b) poisons us as we use it and definitely if it burns.

As a member of our corporate health and safety committee for some years, I had the privilege of attending a seminar by the fire department with a film showing the speed at which an office will burn once it gets going (and your house) …

If I recall correctly, you have about 2 minutes before everyone is at risk of imminent death. This because all furniture is horrifically toxic when it burns.

So if you smell smoke in your house, you look for the point source to see what you can do. I hope you keep fire extinguishers up to date just in case. But … if you feel heat or see a lot of smoke, you have seconds or minutes to get everyone out. The place is probably toast and you don’t want to go with it.

I think it is criminal that the furniture we all have in our houses will kill us even if the flames do not. But such is the world we live in. No doubt someone makes a fortune on these chemicals, so who are we to deny the rich their enormous bounty Annoyed

Read More..