Skip to main content

Posts

Java Applet programs examples

The applet is a special type of program that is embedded in the webpage to generate the dynamic content. It runs inside the browser and works at the client side. The applet is a Java program that can be embedded into a web page. It runs inside the web browser and works at the client side. The applet is embedded in an HTML page using the APPLET or OBJECT tag and hosted on a web server. Applets are small Java applications that can be accessed on an Internet server, transported over the Internet, and can be automatically installed and run as apart of a web document.


// Program to use Applet Program and it's Life Cycle.import java.awt.*;import java.applet.*;/* <applet code="Applet01" width="300" height="200"> </applet>*/publicclass Applet01 extends Applet { publicvoid init() { setBackground(Color.yellow); System.out.println("init() called."); } publicvoid start() { System.out.println("start() called."); }�…

Javascript Simple And Basic Programs

The Javascript simple and easy programs collection for you to better understand how javascript work and how you learn faster way this is all simple program like hello world and simple variable programs for your practice.

<!DOCTYPE html><html><body><h3>JavaScript Arithmetic Operators</h3><pid="demo1"></p><pid="demo2"></p><pid="demo3"></p><pid="demo4"></p><pid="demo5"></p> <script> var x =12; var y =7; var z = x + y; document.getElementById("demo1").innerHTML ="x + y = "+ z; z = x - y; document.getElementById("demo2").innerHTML ="x - y = "+ z; z = x * y; document.getElementById("demo3").innerHTML ="x * y = "+ z; z = x / y; document.getElementById("demo4").innerHTML ="x / y =…

C Programming Array Programs Examples

C Programming Array Programs Examples If you want to learn c programming easy and fast way so you will practice more so here is the c programming array programs examples you can read all these programs and practice on your computer so you will be the master in c programming languages.




// Find sum of array#include<stdio.h>#include<conio.h>voidmain(){int num[10],i,sum=0; clrscr();printf("Enter the 10 number:\n");for(i=0;i<10;i++){scanf("%d",&num[i]); sum+=num[i];}printf("sum=%d",sum); getch();}Output: Enter the 10 number:102030405060709080100 sum=550
/*Print odd and even numbers of an array separately*/#include<stdio.h>#define MAX 50voidmain(){int arr[MAX],n,i;printf("Enter size of Array: ");scanf("%d",&n);printf("Enter %d positive elements\n",n);for(i=0;i<n;i++){scanf("%d",&arr[i]);}printf("\n\nEven numbers: ");for(i=0;i<n;i++){if(arr[i]%2==0){printf("%d"…