LPU,NH-1 GT road, Jalandhar rohit.hero12@gmail.com +91-8437503569 https://www.facebook.com/rohit.adhikary3

P-Programming T-Technology A-And TI-Tips C-Cracking

Monday 20 April 2015

Motivate

Today's tips of the day is that "Don't listen to anyone, just focus on your goal and achieve it". Mean that for your future career don't choose other choice,choose your own goal and after finding your proper goal,go for it and achieve your goal.May be your goal is too hard to achieve but nothing is "IMPOSSIBLE" even "IMPOSSIBLE" says that "I M POSSIBLE".So, just focus on your particular goal and don't let anyone to choose your goal.Just takes advice from them but decision should be your.

Xiaomi MI 4i

Xiaomi MI 4i, the all new smartphone is going to be launched on 23 April ,2014.Its has all feature that of  Xiaomi MI 4 but few features that has being include in this latest model is that it has the high resolution quality,good camera and Longer battery life and the estimate price to buy this Xiaomi MI 4i is Rs-17,999

About us

Dear Reader,

"P-T-A-TI-C" is the blog in which you can have knowledge about the Basics Programming,Technology parts that is of the latest Technology which are in the market,Tips for keeping you active and advance in your life and Cracking is to help you to install software for the life time.If any query or want me to change or put something new please let me know,i will try to put it in this blog.so enjoy reading this blog and gain knowledge and spread them.If any query or if you want to give any suggestion then send mail me at:- rohit.hero12@gmail.com or  leave your comments here.
                                                  "Feel free to share your Idea"

Fahrenheit and Celsius table

Hello reader,
This program is of making the table of Fahrenheit and Celsius and when user will give any value in it it will be showing the result.

#include <stdio.h> //standard library function
#include<conio.h>
  int main()
 {
    int fahr, cel, lower, upper, step;  //define variable
    lower = 0,upper = 300;
    step = 20;     //table upto 20
    fahr = lower;
    while (fahr <= upper) //condition checking {   
     cel = 5 * (fahr - 32) / 9;    //formula for Celsius
     printf("%d\t%d\n",fahr, cel);   //display the result
     fahr += step;
    }
    return 1;  //return the value 

  }

Diamond Pattern

Hello Reader,
This is the program of diamond pattern in which,when user will going to run the program that time there will be the shape of the diamond.
#include<iostream> //standard input/output
#include<conio.h>
using namespace std;
static int z=1; //define static variable
void pattern(int n) //using argument
{
static int i=0;
if(n>=0)   //if condition check
{
    for(int j=n;j>0;j--)  //for loop
{printf("%s",'');}
for(int k=0;k<((2*i)+1);k++) //for loop
{printf("%c",R);} //display
  printf("\n");
z++;
n--;
i++;
pattern(n); //n no of pattern
}
}

Adding Two numbers

Hello Reader,
In this program, i used the simple method to print the two unknown value that user is going to insert it, and by this same method you can try to multiply or divide the two numbers.You can also try for more number.
#include<stdio.h> //standard library input/output
#include<conio.h>
int main() //main module
{
int a,b,ans; //define variables
{
ans=a+b; //sum of two numbers that user want to print as 'a' and 'b'
printf("%d",ans); //display the answer by adding two numbers
}
}

Compound interest

hello Reader,
This is the simple program in which we can calculate Compound Interest, where any user can give any value to it.
#include<stdio.h>  //standard library function
#include<conio.h>
int main()
{
int i,N;   // define variables
float P,R,sum=1,CI;  //define variables
printf("enter price\n");   //print what price user want to enter
scanf("%f",&P);
printf("enter rate\n");  //print what rate user want to enter
scanf("%f",&R);
printf("enter year\n");  //print for how many years user want to enter
scanf("%f",&N);
for(i=1;i<=N;i++)    //for loop from 1-N no
{
sum=sum*(1+(R/100));    // formula for calculating sum
}
CI=P*(sum-1);    //calculating Compound Interest
printf("compound interest=%f",CI);  //display the Compound Interest
getch();
return 0;
}

Introduction

Hello Reader,
In this page,i am going to tell you basic knowledge about the 'C' programming which will help you in future. I am going to tell you the basic concept about 'C'programming.I will be telling you about 'C' language that will help you to make the program and which will make your basic strong.
'C' is the programming language that covert from high level programming to low level programming language.At first there was the Linux operating system in which 'C' language programming is used.
This is small language.Its power is large collection of the Data types and operators.
This is small and easily written and its a standard library.week point of this language is that it is difficult to understand and also to modify the program.if we want to display anything in the screen then we have to write 'Printf' ' and 'Scanf'. It is the Functional Programming Language.
example:-
#include<stdio.h> //standard library
main()
{
printf("Hello: ");
}
where # is the directives and stdio is standard input/output.

Display 'A' in LCD

Hello Reader,
In this page,i am writting about the  program which is going to display in LCD any letter.
#include<util/delay.h> //delay time
#include<avr/io.h>   // atmega 16 input/output
#define RS 0
#define EN 1 //enable
void lcd_command(unsigned char x)
{PORTB=x;  //port B
PORTC=0;  //port C
PORTC|=(1<<EN);
_delay_ms(1);
PORTC&=~(1<<EN);
_delay_ms(100);
}
void lcd_data(unsigned char x)
{PORTB=x;
PORTC=(1<<RS);
PORTC|=(1<<EN);
_delay_ms(1);
PORTC&=~(1<<EN);
_delay_ms(100);
} void lcd_ini()
{
lcd_command(0x38); //command that going to display in LCD
lcd_command(0x01);
lcd_command(0x0E);
lcd_command(0xC4);
}

int main()
{
DDRB=0XFF; // port B
DDRC=0XFF;  //port C
lcd_ini();
lcd_data('A');    // display 'A' in LCD

}

Popular Posts

Recent Posts

Unordered List

Text Widget

Powered By Blogger
Powered by Blogger.

Contributors