Friday, 26 April 2013

Feedback from CS students 2013-14 batch

By Rakhesh   Posted at   Friday, April 26, 2013   No comments
Use this link and complete the process before Monday
Click for the feedback form

Saturday, 6 April 2013

Profiler for XII Students

By Rakhesh   Posted at   Saturday, April 06, 2013   No comments
Use this link to connect to the Profiler Form for XII Science Students

Click here

Friday, 5 April 2013

By Unknown   Posted at   Friday, April 05, 2013   No comments
PROGRAM TO CREATE DIFFERENT PATTERNS        .

#include<iostream.h>
#include<conio.h>
void pattern(char,int,int);
void main()
{ int nl,design;
  char ch;
  do{clrscr();
  cout<<"\n Enter the character: ";
  cin>>ch;
  cout<<"\n Enter the design type(1-5): ";
  cin>>design;
  cout<<"\n Enter the number of lines required: ";
  cin>>nl;
  pattern(ch,nl,design);
  getch();
  cout<<"\n Do you want to continue:(y/n) ";
  cin>>ch;
  }while(ch=='Y'||ch=='y');
}
void pattern(char a,int b,int c)
{ int i,j;
switch(c)
 {case 1: for(i=1;i<=b;++i)
     { for(j=1;j<=i;++j)
       cout<<a<<" ";
       cout<<"\n";
     }
     break;
  case 2: for(i=b;i>0;--i)
     { for(j=i-b;j>0;--j)
       cout<<" ";
       for(j=i;j>0;--j)
       cout<<a<<" ";
       cout<<"\n";
     }
     break;
  case 3: if(b%2==0)
     {  for(i=1;i<=b/2;++i)
     { for(j=1;j<=i;++j)
       cout<<a<<" ";
       cout<<"\n";
     }
     for(i=b/2;i>0;--i)
     { for(j=i-b/2;j>0;--j)
       cout<<" ";
       for(j=i;j>0;--j)
       cout<<a<<" ";
       cout<<"\n";
     }
     }
     else
     {  for(i=1;i<=b/2+1;++i)
     { for(j=1;j<=i;++j)
       cout<<a<<" ";
       cout<<"\n";
     }
     for(i=b/2;i>0;--i)
     { for(j=i-b/2;j>0;--j)
       cout<<" ";
       for(j=i;j>0;--j)
       cout<<a<<" ";
       cout<<"\n";
     }
     }
     break;
  case 4: for(i=1;i<=b;++i)
     { for(j=0;j<b-i;++j)
       cout<<" ";
       for(j=0;j<i;++j)
       cout<<a<<" ";
       cout<<"\n";
     }
     break;
  case 5: if(b%2==0)
    { for(i=1;i<=b/2;++i)
     { for(j=0;j<(b/2)-i;++j)
       cout<<" ";
       for(j=0;j<i;++j)
       cout<<a<<" ";
       cout<<"\n";
     }
      for(i=b/2;i>0;--i)
     { for(j=(b/2)-i;j>0;--j)
       cout<<" ";
       for(j=1;j<=i;++j)
       cout<<a<<" ";
       cout<<"\n";
     }
    }
      else
    { for(i=1;i<=b/2+1;++i)
     { for(j=0;j<((b/2)+1)-i;++j)
       cout<<" ";
       for(j=0;j<i;++j)
       cout<<a<<" ";
       cout<<"\n";
     }
      for(i=(b/2);i>0;--i)
     { cout<<" ";
       for(j=((b/2))-i;j>0;--j)
       cout<<" ";
       for(j=1;j<=i;++j)
       cout<<a<<" ";
       cout<<"\n";
     }
    }break;
 }
}

Thursday, 7 March 2013

Function based menu program

By Unknown   Posted at   Thursday, March 07, 2013   1 comment

#include<iostream.h>
#include<dos.h>
#include<graphics.h>
#include<conio.h>
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#define c 80
#define z 10
#define pi 3.14
void ls(char [],char);
void capital(char []);
int sum(int);
float cal(float,float,char);
void maxmin(int []);
int stlen(char []);
void palindrome(char []);
int vowcnt(char []);
float rad(float);
int rev(int);
int Sum(int);
void prime(int);
double fact(int);
int sqcu(int);
void fct(int);
void arev(char []);
void swap(int []);
void lcgcd(int,int);
void mul(int);
void upcase(char []);
int power(int,int);
int cmp(char[],char[]);
void arm(int);
void main()
{      clrscr();
char str9[c],str8[c],cd,str1[c],str3[c],op,chc,str4[c],str5[c],str6[c],fl[c],str7[c];
int cf,lep,yr,ch,n,m,x,y,nm[z],len,cnt,numb,reve,mn,u,pr,fac,sq,cu,nm1,swp[z],lc,ld,n1,n2,n3,x1;
float res,deg,radi;
double fa;
int gd=DETECT, gm,i=500;
initgraph(&gd, &gm,"");
settextstyle(1,0,4);
setcolor(LIGHTRED);
outtextxy(159,119,"COMPUTER PROJECT");
sound(i);
delay(100);
nosound();
getch();
settextstyle(6,0,2);
setcolor(YELLOW);
outtextxy(159,170,"Done by: Akshay. R");
sound(500);
delay(100);
nosound();
getch();
window(1,1,80,30);
textcolor(BLACK);
textbackground(BLACK);
do
{    clrscr();
settextstyle(2,0,5);
setcolor(LIGHTBLUE);
outtextxy(0,0,"Functions menu:");
sound(700);
delay(100);
nosound();
cout<<"\n1.To search for a element in a 1D array";
cout<<"\n2.Which capitalises first word in a sentence";
cout<<"\n3.Sum of series 1+2+3+....+n";
cout<<"\n4.To perform the job of a calculator";
cout<<"\n5.To find maximum & minimum number in an array";
cout<<"\n6.To find length of the string";
cout<<"\n7.To find if a string is a palindrome or not";
cout<<"\n8.To count the number of vowels in a string";
cout<<"\n9.To convert the angle in degree to radian measure";
cout<<"\n10.To reverse a given number";
cout<<"\n11.To find cube sum of individual digits";
cout<<"\n12.To find if a number is prime or composite";
cout<<"\n13.To find factorial of a number";
cout<<"\n14.To find square of a number if it is even or cube of it if the number is odd";
cout<<"\n15.To find the factors of a number";
cout<<"\n16.To reverse a string";
cout<<"\n17.To swap 1st & last elements in an array";
cout<<"\n18.To find LCD & GCD of 2 integers";
cout<<"\n19.To print multiplication table of a number";
cout<<"\n20.To read a string & converts it into uppercase";
cout<<"\n21.To find a number raised to a power n";
cout<<"\n22.To compare 2 strings";
cout<<"\n23.To print armstrong numbers upto a limit";
cout<<"\n\nEnter your choice(1-23): ";
cin>>ch;
cout<<"\n";
clrscr();
switch(ch)
{
  case 1: cout<<"Enter the string: ";
 gets(str1);
 cout<<"Enter the element to be searched: ";
 cin>>cd;
 ls(str1,cd);
 getch();
 break;
  case 2: cout<<"Enter a string: ";
 gets(str3);
 capital(str3);
 getch();
 break;
  case 3: cout<<"Enter the limit: ";
 cin>>n;
 m=sum(n);
 cout<<"Sum of series is: "<<m;
 getch();
 break;
  case 4: cout<<"Enter 2 numbers: ";
 cin>>x>>y;
 cout<<"Enter a operator(+,-,*,/): ";
 cin>>op;
 res=cal(x,y,op);
 cout<<"Result of operation is: "<<res;
 getch();
 break;
  case 5: cout<<"Enter the numbers: ";
 for(int i=0;i<z;++i)
 { cin>>nm[i];
 }
 maxmin(nm);
 getch();
 break;
  case 6: cout<<"Enter the string: ";
 gets(str4);
 len=stlen(str4);
 cout<<"Length of the string is: "<<len;
 getch();
 break;
  case 7: cout<<"Enter the string: ";
 gets(str5);
 palindrome(str5);
 getch();
 break;
  case 8: cout<<"Enter the string: ";
 gets(str6);
 cnt=vowcnt(str6);
 cout<<"The vowel count is: "<<cnt;
 getch();
 break;
  case 9: cout<<"Enter the angle in degrees: ";
 cin>>deg;
 radi=rad(deg);
 cout<<"Angle in radians is: "<<radi;
 getch();
 break;
  case 10: cout<<"Enter the number: ";
  cin>>numb;
  reve=rev(numb);
  cout<<"Reverse of the number is: "<<reve;
  getch();
  break;
  case 11: cout<<"Enter the number: ";
  cin>>mn;
  u=Sum(mn);
  cout<<"Cube sum of individual digits is: "<<u;
  getch();
  break;
  case 12: cout<<"Enter a number(greater than 1): ";
  cin>>pr;
  prime(pr);
  getch();
  break;
  case 13: cout<<"Enter the number: ";
  cin>>fac;
  fa=fact(fac);
  cout<<"Factorial of the number is: "<<fa;
  getch();
  break;
  case 14: cout<<"Enter the number: ";
  cin>>sq;
  cu=sqcu(sq);
  if(cu%2==0)
  { cout<<"Square of the number is: "<<cu;
  }
  else
  { cout<<"Cube of the number is: "<<cu;
  }
  getch();
  break;
  case 15: cout<<"Enter the number: ";
  cin>>nm1;
  fct(nm1);
  getch();
  break;
  case 16: cout<<"Enter the string: ";
  gets(fl);
  arev(fl);
  getch();
  break;
  case 17: cout<<"Enter the numbers: ";
  for(i=0;i<z;++i)
  { cin>>swp[i];
  }
  swap(swp);
  getch();
  break;
  case 18: cout<<"Enter 2 numbers: ";
  cin>>lc>>ld;
  lcgcd(lc,ld);
  getch();
  break;
  case 19: cout<<"Enter a number: ";
  cin>>n1;
  mul(n1);
  getch();
  break;
  case 20: cout<<"Enter the string: ";
  gets(str7);
  upcase(str7);
  getch();
  break;
  case 21: cout<<"Enter the number & the value of n: ";
  cin>>n2>>n3;
  x1=power(n2,n3);
  cout<<"Result is: "<<x1;
  getch();
  break;
  case 22: cout<<"Enter the 1st string: ";
  gets(str8);
  cout<<"Enter the 2nd string: ";
  gets(str9);
  cf=cmp(str8,str9);
  if(cf==0)
  { cout<<"Both strings are of equal length";
  }
  else if(cf==1)
  { cout<<"First string is greater than second string";
  }
  else
  { cout<<"Second string is greater than first string";
  }
  getch();
  break;
  case 23: cout<<"Enter the limit: ";
  cin>>yr;
  arm(yr);
  getch();
  break;
  default: cout<<"Wrong choice";
  sound(700);
  delay(300);
  nosound();
}
cout<<"\n\nDo you want to continue(Y/N)? ";
cin>>chc;
if(chc=='n'||chc=='N')
{ clrscr();
  settextstyle(4,0,6);
  setcolor(RED);
  outtextxy(159,119,"Thank You");
  delay(5);
}
sound(650);
delay(100);
nosound();
} while(chc=='Y' || chc=='y');
}
void ls(char a[],char b)
{
  int ct=0;
  cout<<"Element is found at: ";
  for(int i=0;a[i]!='\0';++i)
  { if(a[i]==b)
    { ct++;
      cout<<i+1<<",";
    }
  }
  if(ct==0)
  { cout<<"\nElement is not found";
  }
}
void capital(char d[])
{ cout<<"Modified string is: ";
  for(int i=0;d[i]!='\0';++i)
  { d[0]=toupper(d[0]);
    if(d[i]==' ')
    { d[i+1]=toupper(d[i+1]);
    }
    cout<<d[i];
  }
}
int sum(int q)
{ int w=0;
  for(int i=1;i<=q;++i)
  { w+=i;
  }
  return w;
}
float cal(float o,float p, char po)
{ float Res;
  switch(po)
  { case '+':Res=o+p;
    break;
    case '-':Res=o-p;
    break;
    case '*':Res=o*p;
    break;
    case '/':Res=o/p;
    break;
    default: cout<<"Wrong operator";
  }
  return Res;
}
void maxmin(int qw[])
{ int max,min;
  max=min=qw[0];
  for(int i=0;i<z;++i)
  { if(qw[i]>max)
    { max=qw[i];
    }
    else if(qw[i]<min)
    { min=qw[i];
    }
  }
  cout<<"Maximum number is: "<<max;
  cout<<"\nMinimum number is: "<<min;
}
int stlen(char st[])
{ for(int i=0;st[i]!='\0';++i)
  { cout<<"";
  }
  return i;
}
void palindrome(char pal[])
{ int flag=1;
  for(int len=0;pal[len]!='\0';len++);
  for(int i=0,j=len-1;i<len/2;i++,j--)
  { if(pal[i]!=pal[j])
    { flag=0;
      break;
    }
  }
  if(flag==0)
  { cout<<"String is not a palindrome";
  }
  else
  { cout<<"String is a palindrome";
  }
}
int vowcnt(char vow[])
{ int count=0;
  for(int i=0;vow[i]!='\0';++i)
  { switch(vow[i])
    { case 'a': ++count;break;
      case 'e': ++count;break;
      case 'i': ++count;break;
      case 'o': ++count;break;
      case 'u': ++count;break;
      case 'A': ++count;break;
      case 'E': ++count;break;
      case 'I': ++count;break;
      case 'O': ++count;break;
      case 'U': ++count;break;
      default: cout<<"";
    }
  }
  return count;
}
float rad(float dg)
{ float mes;
  mes=(pi/180)*dg;
  return mes;
}
int rev(int nm)
{ int rem=0,re=0;
  while(nm>0)
  { rem=nm%10;
    re=rem+(re*10);
    nm/=10;
  }
  return re;
}
int Sum(int t)
{ int rem=0,v=0;
  while(t>0)
  { rem=t%10;
    v+=rem*rem*rem;
    t/=10;
  }
  return v;
}
void prime(int prm)
{ int count=0;
  for(int i=2;i<prm;++i)
  { if(prm%i==0)
    { count++;
    }
  }
  if(count==0)
  { cout<<"Prime number";
  }
  else
  { cout<<"Composite number";
  }
}
double fact(int y)
{ double facto=1.0;
  for(int i=1;i<=y;++i)
  { facto*=i;
  }
  return facto;
}
int sqcu(int qs)
{ int res=0;
  if(qs%2==0)
  { res=qs*qs;
  }
  else
  { res=qs*qs*qs;
  }
  return res;
}
void fct(int nm2)
{ cout<<"Factors of the number are: ";
  for(int i=1;i<=nm2/2;++i)
  { if(nm2%i==0)
    { cout<<i<<" ";
    }
  }
}
void arev(char fl1[])
{ for(int len=0;fl1[len]!='\0';++len);
  cout<<"Reverse of the string is: ";
  for(int i=len-1;i>=0;--i)
  { cout<<fl1[i];
  }
}
void swap(int sp[])
{ int sop;
  for(int i=0;i<z;++i)
  { sop=sp[0];
    sp[0]=sp[z-1];
    sp[z-1]=sop;
    cout<<"Swapped first value is :"<<sp[0]<<" & last value is: "<<sp[z-1];
    break;
  }
}
void lcgcd(int a1,int a2)
{ int max=0,min=1000;
  for(int i=2,j=2;i<=a1,j<=a2;++i,++j)
  { if(a1%i==0 && a2%j==0)
    { if(i==j)
      { if(j<min)
{ min=j;
}
if(j>max)
{ max=j;
}
      }
    }
  }
  if(min==1000 && max==0)
  { cout<<"No common divisors";
  }
  else
  { cout<<"LCD: "<<min<<"\nGCD: "<<max;
  }
}
void mul(int m1)
{ int mu=1;
  cout<<"Multiplication table";
  for(int i=1;i<11;++i)
  { mu=m1*i;
    cout<<"\n"<<m1<<"*"<<i<<"="<<mu;
  }
}
void upcase(char up[])
{ cout<<"Modified string is: ";
  for(int i=0;up[i]!='\0';++i)
  { up[i]=toupper(up[i]);
    cout<<up[i];
  }
}
int power(int b1,int b2)
{ int powr=1;
  for(int i=0;i<b2;++i)
  { powr*=b1;
  }
  return(powr);
}
int cmp(char a[],char b[])
{ for(int i=0;a[i]!='\0';++i);
  for(int j=0;b[j]!='\0';++j);
  if(i==j)
  { return 0;
  }
  else if(i>j)
  { return 1;
  }
  else
  { return -1;
  }
}
void arm(int ye)
{ int ab,bc,cd,su=0;
  cout<<"\nArmstrong numbers from 1 to "<<ye<<" are: \n";
  for(int i=1;i<=ye;++i)
  { ab=i/100;
    bc=i/10-ab*10;
    cd=i%10;
    su=(ab*ab*ab)+(bc*bc*bc)+(cd*cd*cd);
    if(su==i)
    { cout<<i<<"  ";
    }
  }
}
/*Done by: Akshay. R     */

Tuesday, 5 March 2013

Program to Create Tables From 1 to 10

By Unknown   Posted at   Tuesday, March 05, 2013   No comments
Hey guys! After compiling this program IT LOOKS AMAZING! Trust me :)

It just generates the tables of/from 1 to 10 :)
Piece of cake..

#include<iostream.h>
#include<conio.h>
void main( )
{
       int Yo;
       clrscr ( );
       for(int i = 1; i<=10; i++)
{
       for(int j=1; j<=10; j++)
{
       Yo = i *j ;
       cout<<i<<"*"<<j<<"="<<Yo;
       cout<<"\t";
}
       cout<<"\n";
}
getch ( );
}

Program to stimulate movement of a car

By Unknown   Posted at   Tuesday, March 05, 2013   No comments
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{ clrscr();
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
while(!kbhit())
{ for(int i=0;i<=500;++i)
  {
    delay(1);
    settextstyle(2,0,5);
    outtextxy(400,450,"Done by: Akshay. R");
    setfillstyle(3,WHITE);
    bar(100+i,50,200+i,100);
    rectangle(100+i,50,200+i,100);
    rectangle(100+i,50,200+i,100);
    setfillstyle(1,LIGHTRED);
    bar(50+i,100,250+i,160);
    rectangle(50+i,100,250+i,160);
    settextstyle(2,0,4);
    outtextxy(55+i,110,"AUDI A8");
    outtextxy(100,10,"BEFORE CAR WASH ");
    setfillstyle(4,WHITE);
    sector(100+i,160,0,360,25,25);
    circle(100+i,160,25);
    setfillstyle(4,WHITE);
    sector(195+i,160,0,360,25,25);
    circle(195+i,160,25);
    sound(500+i);
    delay(5);
    nosound();
    cleardevice();
    line(0,160+25,195+500,160+25);
    setfillstyle(1,LIGHTGRAY);
    bar(0,160+25,195+500,200);
    setfillstyle(1,BROWN);
    bar(600,25,650,200);
    settextstyle(2,1,7);
    outtextxy(610,30,"CAR WASH");
  }
  for(i=0;i<=500;++i)
  { delay(1);
    settextstyle(2,0,5);
    outtextxy(400,450,"Done by: Akshay. R");
    setfillstyle(3,WHITE);
    bar(100+i,250,200+i,300);
    rectangle(100+i,250,200+i,300);
    rectangle(100+i,250,200+i,300);
    setfillstyle(1,RED);
    bar(50+i,300,250+i,360);
    rectangle(50+i,300,250+i,360);
    settextstyle(2,0,4);
    outtextxy(55+i,310,"AUDI A8");
    outtextxy(100,190,"AFTER CAR WASH");
    setfillstyle(4,WHITE);
    sector(100+i,360,0,360,25,25);
    circle(100+i,360,25);
    setfillstyle(4,WHITE);
    sector(195+i,360,0,360,25,25);
    circle(195+i,360,25);
    sound(500+i);
    delay(5);
    nosound();
    cleardevice();
    line(0,360+25,295+500,360+25);
    setfillstyle(1,LIGHTGRAY);
    bar(0,360+25,295+500,400);
    setfillstyle(1,BROWN);
    bar(600,225,650,400);
    settextstyle(2,1,7);
    outtextxy(610,230,"EXIT");
 }
}
getch();
}
/*DONE BY:  AKSHAY. R      */

PROGRAM TO SIMULATE PIANO

By Unknown   Posted at   Tuesday, March 05, 2013   No comments

/*This is the program that simulates
piano an is done with the help of array's
and sound function and use of simple graphic*/
#include <dos.h>
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
 void main()
{ clrscr();
  char ch[50];int a=10,b=10,c=10,d=10,e=10,f=10,g=10,h=10;
  int gd=DETECT,gm;
  initgraph(&gd,&gm,"");
  setcolor(RED);
  {settextstyle(4,0,3);
  outtextxy(120,5," E n t e r    t h e    t u n e ");
  settextstyle(2,0,5);
  outtextxy(480,30,"DONE BY:-NAVEEN.M.N");
 }
  settextstyle(0,0,100);
  setbkcolor(CYAN);


  for(int i=0;ch[i-1]!='0',i<50;++i)
  {ch[i]=getche();
   if(ch[i]=='0')
   break;
  switch(ch[i])
  {case '1':outtextxy(a,50," ");
   a+=40;
   break;
   case '2':outtextxy(b,100," ");
   b+=40;
   break;
   case '3':outtextxy(c,150," ");
   c+=40;
   break;
   case '4':outtextxy(d,200," ");
   d+=40;
   break;
   case '5':outtextxy(e,250," ");
   e+=40;
   break;
   case '6':outtextxy(f,300," ");
   f+=40;
   break;
   case '7':outtextxy(g,350," ");
   g+=40;
   break;
   case '8':outtextxy(h,400," ");
   h+=40;
   break;
  }
  }
  for(int j=0;j<i;++j)
  {if(ch[j]=='0')
   break;
  switch(ch[j])
  {case '1':sound(240);
   delay(100);
   nosound();
   continue;
   case '2': sound(300);
    delay(100);
    nosound();
    continue;
   case '3' : sound(360);
     delay(100);
     nosound();
     continue;
   case '4' : sound(420);
     delay(100);
     nosound();
     continue;
   case '5' : sound(480);
     delay(100);
     nosound();
     continue;
   case '6' : sound(540);
     delay(100);
     nosound();
     continue;
   case '7' : sound(600);
     delay(100);
     nosound();
     continue;
   case '8' : sound(660);
     delay(100);
     nosound();
     continue;
  }
  }
closegraph();
}
/*For modification email to "npr123456789@gmail.com"
DONE BY:-NAVEEN.M.N*/

Back to top ↑
Connect with Us

    Total Pageviews

    Powered by Blogger.

    Followers

    Blogroll

What they says

© 2013 The Programming Trailblazers . WP Mythemeshop Converted by Bloggertheme9
Blogger templates . Proudly Powered by Blogger .