Friday, March 27, 2009

Getting the Numbers of Failed Students


This is a code in a getting the number of the students who had made to passed and failed.

Code:

# include......
# include......

int main()
{
int passes = 0;
int failures = 0;
int student = 1;
int result;



while (student <= 10)
{
printf("Enter result (1=pass,2=Fail):");
scanf("%d", &result);
if (result == 1)
{
passes = passes + 1;
}
else
{
failures = failures + 1;
}
student = student + 1;
}
printf("Passed %d\n", passes );
printf("Failed %d\n", failures );
if ( passes > 8 )
{
printf("Raise Tuition\n");

}

getch();
}


Output:



Wednesday, March 25, 2009

A Day to Remember

Today is a day that I have to remember always, why? it is because this is the day in which their are so many unexpected events happen unto my life, such as I have now my love one. I am so happy because, of that person. That person came in my life I think to really change me. Everything on me really change my attitudes and my especially my mental growth because even though I am now 19 yrs old, but still I am acting like in a late childhood stage but now I am now fully mature and you know what my readers? that person really change me, because on my past I am just playing when it came to love but now this is my first time to be serious in one relationship and thats why I can say that, that person really change me.