Quantcast
Channel: Java Question Bank » Cpp Programs
Viewing all articles
Browse latest Browse all 22

C Program to print 3 digit number in which first digit is your last mobile number and next two digit your age

$
0
0

c program which takes input  ur mobile no and gives out put as  3 digit number  in which first  digit  is ur last mobile no and next two digit your age

#include<stdio.h>
void main()
{
int a[10],year;
int i,n,m,l,g,h,y,t;
clrscr();
printf(“enter your 10 digit mobile number separated with single space \n”);
for(i=0;i<10;i++)
{
scanf(“%d”,&a[i]);
}
n=a[9];
printf(“\n%d”,n);
m=n*2;
printf(“\n”,m);
t=m+5;
printf(“\n%d”,t);
l=t*50;
printf(“\n%d”,l);
g=(l+1763);
printf(“\n%d”,g);
printf(“\n”);
printf(“enter your birth year\n”);
scanf(“\n%d”,&year);
h=year;
y=(g-h);
printf(“\n%d”,y);
printf(“\n”);
printf(” Now you will get three digit number\n first digit indicates last number of your mobile number\n next 2 digit indictaes your age!!!\n THANK YOU”);
getch();
}

More Examples you may need:

1. Write a C program that illustrates inter process communication using shared memory system calls

2. To Implement FILE Organization Technique through Two level Directory

3.To write a c program to create a message queue with read and write permissions to write 3 messages to it with different priority numbers

4.To write a c program to create a child process and allow the parent to display “parent” and to child to display “child” on the screen

5.To write a c program to create a message queue with read and write permissions to write 3 messages to it with different priority numbers

6.To Simulate the file allocation strategy using Link Method

More Java Programs :

1.Java program for implementing Selection sort (119)

129 total views, 1 views today


Viewing all articles
Browse latest Browse all 22

Trending Articles