Monday, October 12, 2009

Iterative Statement - Problem on C Programming

What is the screen output of the ff. program?

#include
main()
{
int x,y;
for (x=2;x<=4;x++)
for(y=5;y>=3;y--)
printf("%d\n",x+y);
getch();
}

Output:

7
6
5
8
7
6
9
8
7
_

Labels:

Wednesday, October 07, 2009

C Program using FOR Statement

Problem:

Write a program that will print the numbers 1 to 10 using a FOR Statement.


Program:

#include"stdio.h"
int x;
main( )
{
for (x=1;x<=10;x++)
printf ("%d"\n",x);
getch( );
}


Output:

1
2
3
4
5
6
7
8
9
10

Labels:

Monday, October 05, 2009

C Programming Lesson - Iterative (Looping) Statements

CHAPTER 10

ITERATIVE STATEMENTS
(Click the word above to view the presentation)

Have a nice day!

Labels:

Saturday, October 03, 2009

Adsense Highest Paying Keywords

PURCHASE STRUCTURED SETTLEMENT keyword is rank 1 which has a cost per click or CPC $53.48.

MESOTHELIOMA LAWYERS SAN DIEGO keyword is rank 2 which has has a cost per click or CPC of $51.47.

Source: www.tareeinternet.com

Labels:

Sunday, September 27, 2009

C Program using Conditional Statements

Problem:

XYZ Company gives year-end bonus to its employees based on their number of years of service and their salary, using the following:

Years of Service wwwwwwwwwwwwwwwwwwwwwBonus

1 wwwwwwwwwwwwwwwwwwwwwwwwwwwwww10% of Salary
2 to 4 wwwwwwwwwwwwwwwwwwwwwwwwwwww20% of Salary
5 to 10 wwwwwwwwwwwwwwwwwwwwwwwwwww50% of Salary
11 and above wwwwwwwwwwwwwwwwwwwwwww 75% of Salary

Program:( Click the image to enlarge)

Labels:

Planetarium Zero-Zero

I know lots of people go to SM Mall of Asia in Pasay City to go malling. But only a few could go sleeping in MoA.

And by chance, we are one of those.

Anyway the story was like this. We had our National PSYSC Science Olympiad Finals sa Nido Fortified Science Discovery Center sa Entertainment Mall nang nagsimula ang hagupit ni Ondoy. Then the MoA people advised the PSYSC facis not to permit us to go back to our residences dahil naging ilog na yung mga daan, like Roxas Boulevard, EDSA, the like.

So, all of us (about 250 heads), including the participants, coaches, parents and the facis, plus the SDC staff, stayed on MoA.

At anong ginawa namin? Most went to the Planetarium, dahil binigyan kami ng free movie marathon for about four hours, then sleeping time after that. Nakatutok naman yung iba sa TV (yung iba sa projector screen sa Events Center) to watch news updates about the typhoon. At yung iba, natulog na lamang, hoping na sana makakauwi na the morning after.

And so it was. Most of us went home the morning after. We went out in MoA at exactly 0600.

So three lessons learned on this funny yet once-in-a-lifetime (?) experience:
  1. Stay calm.
  2. Enjoy the place.
  3. Eat well.

"Cabin crew, prepare for take-off."





smsanch >

Wednesday, September 23, 2009

Sample C Program on Conditional Statements

Problem:

Write a C program that finds the smallest among the five integers inputted by the user.

Program: (click the image to enlarge)


Labels:

Friday, September 18, 2009

C Programming Lesson - Conditional Statements

Chapter 8

Conditional Statement
(Click to to view the presentation)



Labels: