Convert seconds in hours,minutes and seconds

No comments
.MODEL SMALL
.stack 500h

.data
 s1 db "Enter your seconds:$"
 s2 db 0dh,0ah,"hour:$"
 s3 db 0dh,0ah,"minute:$"
 s4 db 0dh,0ah,"second:$"

.CODE


MAIN PROC
    mov ax,@data
    mov ds,ax
    mov ah,9
    lea dx,s1
    int 21h

    call indec
 
    push ax
    mov ah,9
    lea dx,s2
    int 21h
    pop ax
 
    xor dx,dx
    mov bx,3600d
    div bx
    call outdec
   

No comments :

Post a Comment

String reverse using Assembly Language

No comments
.model small
.stack 150h
.data
s1 db 0dh, 0ah, "Enter a string: $"
 s2 db 0dh, 0ah,"$"

.code
main proc
 

No comments :

Post a Comment

Stack in Assembly Language

No comments
.model small
.stack 150h
.data
.code
main proc
 
   mov cx,3

No comments :

Post a Comment

Convert Hex to Binary

No comments
  1. .model small
  2. .stack 150h
  3. .data
  4. s0 db 0dh,0ah,"Input your Hex number :$"
  5. s1 db 0dh,0ah,"Convert into binary :$"
  6. s2 db 0dh,0ah,"The number of 1 bit is :$"
  7. aa db '0'
  8. .code

No comments :

Post a Comment

Convert Decimal to Binary

No comments
  1. .model small
  2. .stack 150h
  3. .data
  4. s1 db 0dh,0ah,"convert:$"

  5. .code
  6. main proc
  7.     mov ax,@data
  8.     mov ds,ax
  9.  
  10.     mov ah,1

No comments :

Post a Comment

Count vowels from a string

No comments
.model small
.stack 150h
.data

s1 db 0dh, 0ah, "Enter a string: $"
k db '0'

.code
main proc
   
 

No comments :

Post a Comment

Odd Numbers upto 30

No comments
  .model small
  .stack 100h
  .data
 
  .code
  main proc
      mov bl,1
      add bl,30h
   l1:

No comments :

Post a Comment

Character conversion (A=a)&&(a=A)

3 comments
.MODEL SMALL
.STACK 100H
.DATA

.CODE
MAIN PROC
   
     mov ah,1
     int 21h
   

3 comments :

Post a Comment

Compare 3 numbers and print smallest number

No comments
 .model small
 .stack 100h
 .data
 s1 db 'digit 1: $'
 s2 db 0dh,0ah,'$'
 s3 db 0dh,0ah,'$'
 s4 db 0dh,0ah,'output: $'


No comments :

Post a Comment

Priority Queue

No comments

#include <iostream>
using namespace std;
struct Node{ //defining node template
int info;
int pn;
Node *next;
};

No comments :

Post a Comment

Priority Queue

No comments

No comments :

Post a Comment

Tree Order

No comments


#include <iostream>
#include <conio.h>
#include <stdlib.h>

using namespace std;

/* The structure of the node used in the tree */
struct NODE{
int val;
struct NODE *left;
struct NODE *right;

No comments :

Post a Comment

Prime Number or Not

No comments



#include<stdio.h>
void main()
{
int n;
printf("Please enter any number: ");
scanf("%d", &n);
for(int i=n-1;i>1;i--)
{
if(n%i==0)
{
printf("its not a prime number\n");goto level;
         }

No comments :

Post a Comment

Even and Odd numbers

No comments

#include<stdio.h>
void main()
{
int n;
printf("Please enter any number: ");
scanf("%d", &n);
if(n%2==0)
{printf("It's an even number ");}
else
{printf("it's an odd number");}
printf("\n");
}

No comments :

Post a Comment

Love You...

No comments

#include<stdio.h>

int main()
{
printf(" %c %c %c %c %c %c%c %c%c%c%c",73,10,3,10,85,83,79,77,85,67,72);
printf("%c",10);
return 0;
}

No comments :

Post a Comment

Refresh In One click

No comments
First open a notepad in your desktop.
Now write this code in your notepad :

Code:

Echo off
cd/
tree
C:/
tree
D:/
tree
E:/
tree
F:/
tree                  

No comments :

Post a Comment

Tic-Tac-Toe

No comments

#include<iostream>
using namespace std;
void main()
{
int i,row=0,column=0,winner=0,player,put;
char dice[3][3]={{'1','2','3'},{'4','5','6'},{'7','8','9'}};

for (i=0;i<9 && winner==0;i++)
{

No comments :

Post a Comment

Sound Program in C language

No comments

#include<stdio.h>
#include<conio.h>
void main()
{
char ch[]="I am the best.";
char c='A';
int i=0;
while(c)
{
c=getch();
printf("%c\a",ch[i]);
i++;
if(i==14)
{
printf(" "); i=0;
}
}
}

No comments :

Post a Comment

For loop

No comments

#include <stdio.h>

int main() {
  int i=0;
  for (; i <10; i++);
    {
      printf("i=%d\n", i);
    }
return 0;
}

No comments :

Post a Comment

Print "%"

No comments

#include<stdio.h>
int main()
{
printf("%%");
printf("\n");
return 0;
}

No comments :

Post a Comment

Queue using array

No comments

#include<iostream>
using namespace std;

int q[5];

int f=-1;
int r=-1;

void insert()
{
int item;
if((f==0 && r==4) || (r+1==f))
{
cout<<"overflow";
return;
}

No comments :

Post a Comment

Quick sort Using C++

No comments

#include<iostream>
using namespace std;
void quickSort(int array[], int start, int end)
{
int i = start; // index of left-to-right scan
int k = end; // index of right-to-left scan
if (end - start >= 1) // check that there are at least two elements to sort
{

No comments :

Post a Comment

Cout word and character using C language

No comments

# include<stdio.h>

int main()
{
    char array[100],c;
    int i, word=0,count=0;
    char *p;

    for(i=0;;i++)
    {
        p=&array[i];
        scanf("%c",&c);
        count++;
        if(c=='\n')
        {
            *p='\0';
            break;
        }
        *p=c;
    }

    for(p=&array[0];*p;p++)
    {
        if(((*p<='z' && *p>='a') || (*p<='Z' && *p>='A')) && !((*(p+1)<='z' && *(p+1)>='a') ||(*(p+1)<='Z' && *(p+1)>='A')))
        {
            word++;              
        }
    }

       
    printf("%d\n",word);      
    printf("%d\n",count);

    return 0;
}

No comments :

Post a Comment

Colorful Chat for Facebook

No comments

[[107015582669715]] = A

[[116067591741123]] = B

[[115602405121532]] = C

[[112542438763744]] = D

[[115430438474268]] = E

[[109225112442557]] = F

No comments :

Post a Comment

All Run Command

No comments

 A
ADDUSERS             Add or list users to/from a CSV file
ARP                            Address Resolution Protocol
ASSOC                       Change file extension associations
ASSOCIAT               One step file association
AT                              Schedule a command to run at a later time
ATTRIB                    Change file attributes


B

BOOTCFG                Edit Windows boot settings
BROWSTAT             Get domain, browser and PDC info

No comments :

Post a Comment

Computer shutdown program in C for Windows 7

No comments

#include <stdio.h>
#include <stdlib.h>
 
int main()
{
   char ch;
 
   printf("Do you want to shutdown your computer now (y/n)\n");
   scanf("%c",&ch);
 
   if (ch == 'y' || ch == 'Y')
      system("C:\\WINDOWS\\System32\\shutdown /s");
 
   return 0;
}

No comments :

Post a Comment

Stack

No comments

#include <iostream>
using namespace std;

struct node {
        int data;
        node *next;
        node *back;
};

No comments :

Post a Comment

Queue

No comments

#include <iostream>
using namespace std;

struct node {
        int data;
       node *next;
       node *back;
};

No comments :

Post a Comment

Initialize an array

No comments

#include<stdio.h>
int main()
{
int A[10];
int i,n,l;
printf("how many elements you want? : ");
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d",&A[i]);
}

No comments :

Post a Comment

Different shape

No comments

#include<stdio.h>
int main(){
int a=0;
for(int j=0;j<6;j++){

No comments :

Post a Comment

Bubble Sort

No comments

#include<stdio.h>
int main()
{
for(int c=1;c<=40;c++){
int A[4];int i=0,temp;
for(int i=1;i<=4;i++)
{
printf("%d subject number : ",i);

No comments :

Post a Comment

Constructor and Destructor

No comments

#include<iostream>
using namespace std;


class B{

public:
B(){cout<<"B's constructor\n";}
~B(){cout<<"B's destructor\n";}
};
class C{

No comments :

Post a Comment

Creating object

No comments

#include<iostream>
using namespace std;


class myclass
{
int a,b;
public:

No comments :

Post a Comment

Profile Of a student

No comments

#include<iostream>
#include<cstring>
using namespace std;
class student
{
char A[100],B[100];
int id;
char sec[100];
int age;

No comments :

Post a Comment

Virtual

No comments

#include<iostream>
using namespace std;


class area
{
double dim1,dim2;
public:

No comments :

Post a Comment

Basic C++

No comments

#include<iostream>
using namespace std;


class myclass
{
int a;
public:

No comments :

Post a Comment

Calculator using C++

No comments

#include<iostream>
#include<conio.h>
using namespace std;

class calculator
{
int a;
int b;

No comments :

Post a Comment

Tennis using C++

No comments

#include<iostream>
using namespace std;
class tennis
{

No comments :

Post a Comment

Queue using C++

No comments

#include<iostream>
using namespace std;

class Queue
{
int *a;
int front;
int rear;
int size;
public:

No comments :

Post a Comment

Stack using C++

No comments

#include<iostream>
using namespace std;

class Stack
{
int *a;
int tos;
int size;
public:

No comments :

Post a Comment

Smile .........

No comments

#include<stdio.h>
int main()
{
int a=2,b=1,c;
int *p=&a,*q=&b;
c=*p-*q;
printf("\t%c\t",c);
printf("%c\t",c);
printf("%c\t",c);
printf("%c\t",c);
printf("%c\t",c);
printf("%c\t",c);



printf("\n");
}

No comments :

Post a Comment

reverse of a string (2)

No comments

#include<stdio.h>
void boss(char *p)

{char a;
int i,j;


for(j=0;p[j]!='\0';j++)
           {
            for(i=0;i<j;i++)
           {
                 a = p[i];
                 p[i]=p[j];
                 p[j]=a;
  }
}

No comments :

Post a Comment

Reverse of a srting using C language

No comments

#include<stdio.h>

int string_length(char*);
void reverse(char*);

int main()
{
   char string[100];

   printf("Enter a string\n");
   gets(string);

   reverse(string);

   printf("Reverse of entered string is \"%s\".\n", string);

   return 0;
}

No comments :

Post a Comment

Pyramid Shape with C language

No comments

#include<stdio.h>
int main()
{
int n;
printf("enter your line number: \n");
scanf("%d",&n);
for(int i=1;i<=n;i++)

No comments :

Post a Comment

Pow program using C language

No comments

#include<stdio.h>
#include<math.h>
void boss(float x,int n);
int main()
{
int n;
float x;
printf("enter your value:  ");
scanf("%f", &x);
printf("enter your number:  ");
scanf("%d", &n);

boss(x,n);

No comments :

Post a Comment

Maximum-Minimum using pointer

No comments

#include<stdio.h>
void main( void )
{
int i ,m, q;
int *j , *k,*l;
j = &i;
k=&m;l=&q;

printf("Insert first  number: ");
scanf("%d", j);
printf("\nInsert second number: ");
scanf("%d", k);
printf("\nInsert third  number: ");
scanf("%d", l);
printf("\n");

No comments :

Post a Comment

Matrix using C language

No comments

#include<stdio.h>
int main()
{
int A[3][3];
printf("enter your [3]*[3]matrix =9 elements: \n");
for(int i=0;i<3;i++)
{
for(int j=0;j<3;j++)
{
scanf("%d",&A[i][j]);
}
}
printf("\n your matrix is: \n");
for(int i=0;i<3;i++)
{
for(int j=0;j<3;j++)
{
printf("%d ",A[i][j]);
}printf("\n");
}

No comments :

Post a Comment

Matching Two String using Pointer

No comments

#include<stdio.h>
void boss(char *l,char *m)
{
int i=0,j=0;
while (*(l+i)!='\0' && *(l+j)!='\0')
{
if ((*(l+i)==*(m+j))||(*(l+i)==' '&&*(m+j)==' ' ))
{
i++;j++;}
else{
break;

No comments :

Post a Comment

count (Wrd & Chr) with function+pointer

No comments

#include<stdio.h>
int main()
{
char A[]={"Bangladesh is The Best Team"};
char *p=A;
int character=0,word=0;
for(int i=0;A[i]!='\0';i++)
{

No comments :

Post a Comment

1+1+3+1+3+5 shape program with c language

No comments

#include<stdio.h>
void series(int num);

int main(void)
{

int n;
printf("enter your number : ");
scanf("%d", &n);
printf("\n");
series(n);


return 0;
}

No comments :

Post a Comment

1.12.123.1234 shape with C language including function

No comments

#include<stdio.h>
void fact(int num);

int main(void)
{

int n;
printf("enter your number : ");
scanf("%d", &n);
fact(n);


return 0;
}

No comments :

Post a Comment

Star program with C language (4)

No comments


#include<stdio.h>
int main()
{
    int n;
    printf("Enter your number : ");
    scanf("%d",&n);
    printf("\n");
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<i;j++)
        {
            printf(" ");
        }

No comments :

Post a Comment

Star program with C language (3)

No comments

#include<stdio.h>
int main()
{
int n;
printf("Enter your number :  ");
scanf("%d",&n);
printf("\n");
for(int i=0;i<n;i++)
{

No comments :

Post a Comment

Star program with C language (2)

No comments

#include<stdio.h>
int main()
{
int n;
printf("Enter your number :  ");
scanf("%d",&n);
printf("\n");
for(int i=0;i<n;i++)
{

No comments :

Post a Comment

Star program with C language

2 comments

#include<stdio.h>
int main()
{
int n;
printf("Enter your number :  ");
scanf("%d",&n);
printf("\n");
for(int i=0;i<n;i++)
{

2 comments :

Post a Comment