Feedback

Passerelles Numeriques introduces new website

Just today, June 13, 2012 Ate Rosalyn MiƱoza, our Social Worker in PN posted “ Introducing the new website of Passerelles numeriques! ;-)

Despedida Party of Ma'am Helene, Sir Thomas and Ma'am Elsa

CSNA2013 together with our beloved Education Manager - Ma'am Helene, Project Manager - Sir Thomas and Ma'am Elsa

CSNA 2014

Batch 2014 group picture

CSNA 2013 Scholars

Group picture of PN Scholars Batch 2013

The Graduates

24 Pioneer scholars who graduated last March.

Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Site Does't Work in IE?



I was using firefox as a browser in in viewing my the output of the php application i made to the company where i am having my intership now. It was a straight road during the production of the application. But one time when i test if the application is a cross browser application, then one shocking output i didn't expect IE keeps on prompting an error what the big problem is i didn't what how would i trace the error sense i doesn't have "contol+shift+j" to view errors unlike firefox and chrome what ive done first is i trace the script manually huh =( doest work..Then i ask mr.google on how to trace bugs on IE then i got this link link here will sounds ok. I was shocked when i discovered, after all the time ive wasted it is the comma. Well that was an experience then atleast i know now how to debug IE hehehe...I was amaze how powerful the comma is.

The Switch Statement

Last Tuesday, July 31, 2012, we continued our regular tutorial sessions with the First year. Since we haven't followed the flow of their discussions at the university, we tried to ask them questions if which part of their discussions they find it hard most. Majority answered the switch statement so we give it shot.

I know you guys find it hard to follow my discussion since they were mostly vocal so I'll show you the complete code on how to do it. The switch statement code that I gave you as an example are as follows:

#include<stdio.h>
#include<conio.h>

int main(){
 char choice='';
 clrscr();
 
 printf("Press [A] to Resume [B] for New Game and [C] to Exit\n");
 scanf("%c", &choice);
 
 switch(choice){
  case 'A':{
     printf("Please wait, resuming game. . .");
    };break;
  case 'B':{
     printf("Please wait, Starting New Game. . .");
    };break;
  case 'C':{
     printf("Exiting. . .");
    };break;
  default:{
     printf("Invalid Input!");
    };
 }
 
 getch();
}


For questions, feel free to comment below and we would gladly try our best to reply to each of your concerns.

Next Topic: The If...Else condition.

Basic C Tutorials


This post will contain a series of simple C programming tutorials and examples. I think this will be helpful to the first years since they're on to this. For discussions on this post, kindly visit the forum.

Print text on screen

#include<stdio.h>
#include<conio.h>

main(){
printf("Hello World!\n");
getch();
return 0;
}
You might be wondering why the conio.h header file was included when our main goal was just to print some text on our screen. Well, let's try dissecting our code line by line.
printf("Hello World!\n");
This line is obviously what we want our program to do. The printf() function uses the stdio.h header file/library, now why would we need the conio.h header file?
getch();
This little function makes us see our output. Why? When we run a program, it will automatically exit if we don't include the getch() function. The getch() takes a character without printing it to the screen. Once a character is entered, only then will it exit by going to line 7. Therefore, getch() will stop our program from exiting until it receives a character. And the getch() function fortunately uses the conio.h header file. If you try removing the getch() from your program, you'll notice that once you run the program, it will exit automatically. Well, that's basically how we output text on the screen using C. Stay tune for more updates! Next: Accepting input!

Accepting Input

To accept input from the keyboard, we use the scanf() function which uses stdio.h header. Take a look at the example program:
#include<stdio.h>
#include<conio.h>

int main(){
 char word[]; //variable to hold the input, array of chars
 printf("Enter a word: ");
 scanf("%s", &word); //stores the input to the 'word' variable
 printf("You have entered: %s", word);
 getch();
 return 0;
}