Completely Solved C, C++ Programs Assignment.




C Progarm to print Individual Digits

Filed Under:

Problem 7: C Progarm to print Individual Digits
#include<stdio.h>
#include<conio.h>
main( )
{
int a,b,c,d;
clrscr( );
printf ( “ Enter a two digit number :”);
scanf (“ %d”, &a);
b=a/10;
c=a%10;
d=b+c;
printf (“sum of individual digits of given numbers id %”, d);
getch( );
}
C compiler: gcc 4.1.2

Back to main directory: Sample C Program | Software Practical | Solved C Assignment




Get Free Programming Tutorials and Solved assignments