Computer Notes, Programming codes, Hardware and Networking Tip, Entertainment, Biography, Internet Tip, Tech News, Latest Technology, YouTube,
CLS s$ = "NEPAL" r = 1 t = 10 FOR i = 5 TO 1 STEP -2 PRINT TAB(t); MID$(s$, r, i) r = r + 2 t = t + 2 NEXT i END
DECLARE SUB pat(a$) CLS a$ = "NEPAL" CALL pat(a$) END SUB pat (s$) r = 1 t = 10 FOR i = 5 TO 1 STEP -2 PRINT TAB(t); MID$(s$, r, i) r = r + 2 t = t + 2 NEXT i END SUB
DECLARE FUNCTION pat$(a$) CLS a$ = "NEPAL" p$ = pat$(a$) END pat$ (s$) a$ = "NEPAL" r = 1 t = 10 FOR i = 5 TO 1 STEP -2 PRINT TAB(t); MID$(s$, r, i) r = r + 2 t = t + 2 NEXT i END FUNCTION
CLS s$ = "1A2b3c" FOR i = 1 TO LEN(s$) FOR j = 1 TO i PRINT MID$(s$, i, 1); NEXT j PRINT NEXT i END
DECLARE SUB pattern(s$) CLS s$ = "1A2b3c" CALL pattern(s$) END SUB pattern (s$) FOR i = 1 TO LEN(s$) FOR j = 1 TO i PRINT MID$(s$, i, 1); NEXT j PRINT NEXT i END SUB
DECLARE FUNCTION pattern$(s$) CLS r$ = pattern$(s$) END FUNCTION pattern$ (s$) s$ = "1A2b3c" FOR i = 1 TO LEN(s$) FOR j = 1 TO i PRINT MID$(s$, i, 1); NEXT j PRINT NEXT i END FUNCTION
import java.util.Scanner; class Rectangle4{ int l, b; void getData(){ Scanner in = new Scanner(System.in); System.out.print("Enter length : "); l=in.nextInt(); System.out.print("Enter breadth : "); b=in.nextInt(); } void displayArea(){ int a; a = l*b; System.out.println("Area = "+a); } public static void main(String args[]){ Rectangle4 obj = new Rectangle4(); obj.getData(); obj.displayArea(); } }
class Demo{ void display(){ System.out.println("Class Example"); } public static void main(String args[]){ Demo obj = new Demo(); obj.display(); } }
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html" charset=UTF-8"> <title> A simple JSP program </title> </head> <body> <h1> Displaying "I love Programming 100 times !!" </h1> <table> <% for(int i=1; i<=100; i++){ %> <tr> <td> I Love Programming </td> </tr> <% } %> </table> </body> </html>