lets start with C..........the basic programming language................................it is good for beginners................i think so..............as my teachers says C for simple..............as i am also a beginner............and writing my blog this time as tomorrow is my FPl(Fundamental Programming Language paper)...................and know nothing about that........................as C is open source so just Google it and download it...........................
lets solve some mathematics....................this is a basic program me...........in this the user will enter any integer...................and the output will be sum of the individual digits
so lets the programming begin.........
#include<stdio.h>--------(library for getting output)
#include<conio.h>
int main(){
int a,b,c;-----------------(deceleration of variables)
c=0;
printf("enter the number\t");---------------(printing command which will appear on the screen as it is)
scanf("%d",&a);---------------------(input taking command from user)
do{----------------------------------(type of looping,which will check the condition given condition)
b=a%10;
a=a/10;
c=b+c;
}while(b>0);-----------------(condition checked firstly executing the body of the loop)
printf("the sum of the individual digit is\t %d",c);
getch();------------------------------(it is the output function which is there in the above directories)
return 0;}
.
.
.
its new for beginners so just relax................its a toy stuff only............
and the people who are master in this are thinking that the admin of this blog is just time passing................
but i think..............the world can be entertained by just 3 things "programming,programming n girls".......................now tired going to sleep have fun with programming
lets solve some mathematics....................this is a basic program me...........in this the user will enter any integer...................and the output will be sum of the individual digits
so lets the programming begin.........
#include<stdio.h>--------(library for getting output)
#include<conio.h>
int main(){
int a,b,c;-----------------(deceleration of variables)
c=0;
printf("enter the number\t");---------------(printing command which will appear on the screen as it is)
scanf("%d",&a);---------------------(input taking command from user)
do{----------------------------------(type of looping,which will check the condition given condition)
b=a%10;
a=a/10;
c=b+c;
}while(b>0);-----------------(condition checked firstly executing the body of the loop)
printf("the sum of the individual digit is\t %d",c);
getch();------------------------------(it is the output function which is there in the above directories)
return 0;}
.
.
.
its new for beginners so just relax................its a toy stuff only............
and the people who are master in this are thinking that the admin of this blog is just time passing................
but i think..............the world can be entertained by just 3 things "programming,programming n girls".......................now tired going to sleep have fun with programming

No comments:
Post a Comment