Program to generate 5 Random nos. between 1 to 100. Get link Facebook X Pinterest Email Other Apps January 08, 2015 Source code class RandomDemo{ public static void main(String args[]){ for(int i=1;i<=5;i++){ System.out.println((int)(Math.random()*100)); } } } Get link Facebook X Pinterest Email Other Apps Comments
8086 STRING MANIPULATION –FIND AND REPLACE A WORD May 03, 2016 ASSUME CS: CODE, DS: DATA DATA SEGMENT LIST DW 53H, 15H, 19H, 02H REPLACE EQU 30H COUNT EQU 05H DATA ENDS CODE SEGMENT START: MOV AX, DATA MOV DS, AX MOV AX, 15H MOV SI, OFFSET LIST MOV CX, COUNT MOV AX, 00 ... Read more
Animated Circles In C++ October 12, 2016 Source Code #include<stdlib.h> #include<conio.h> #include<graphics.h> #include<dos.h> void main() { int x,y,i; int g=DETECT,d; initgraph(&g,&d,"\tc\bgi"); cleardevice(); x=getmaxx()/2; y=getmaxy()/2; settextstyle(TRIPLEX_FONT, HORIZ_DIR, 3); setbkcolor(rand()); setcolor(4); outtextxy(30,100,"Press"); outtextxy(30,130,"any"); outtextxy(30,160,"key"); outtextxy(30,190, "to"); outtextxy(30,220,"Quit"); while (!kbhit()) { setcolor(rand()); for (int i=0;i<50;i++) circle(x,y,i ... Read more
C program for addition of two matrices. July 09, 2014 source code #include<stdio.h> int main() { int a[3][3],b[3][3],c[3][3],i,j; printf("Enter the First matrix->"); for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d",&a[i][j]); printf("\nEnter the Second matrix->"); for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d",&b[i][j]); printf("\nThe First matrix is\n"); for(i=0;i<3;i++) { printf("\n"); for(j=0;j<3;j++) printf("%d\t",a[i][j]); } printf("\nThe Second matrix is\n"); for(i=0;i<3;i++) { printf("\n"); for(j=0;j<3;j++) printf("%d\t",b[i][j]); } for(... Read more
Comments
Post a Comment