1. Write a c program to reverse any number.
2. Write a c program to find out sum of digit of given number.
2. Write a c program to find out sum of digit of given number.
10. Write a c program to find out NCR factor of given number.
11. How to convert string to int without using library functions in c
12. Program in c to print 1 to 100 without using loop
13. C program for swapping of two numbers
14. Program to find largest of n numbers in c
15. Split number into digits in c programming
16. C program to count number of digits in a number
11. How to convert string to int without using library functions in c
12. Program in c to print 1 to 100 without using loop
13. C program for swapping of two numbers
14. Program to find largest of n numbers in c
15. Split number into digits in c programming
16. C program to count number of digits in a number
8 comments:
whats the differrent btween
x=int(b);
x=abs(b);
It's better to initialize big with INT_MIN, and then check each input number with respect to big.
#include
void main(){
int i,j,num[20],n,big;
printf("Enter the number of Array: ");
scanf("%d",&n);
printf("Enter Numbers ");
for(i=1;i<=n;i++)
scanf("%d",&num[i]);
big=num[0];
for(j=2;j<=n;j++){
if(big<num[j])
big=num[j];
}
printf("Largest number is: %d",big);
}
#include
void main(){
int i,j,num[4],big;
printf("Enter 3 Numbers\n ");
for(i=0;i<3;i++)
scanf("%d",&num[i]);
big=num[0];
for(j=1;j<3;j++){
if(big<num[j])
big=num[j];
}
printf("Largest number is: %d",big);
}
#include
#include
int main()
{
int n,num,big
;
printf("Enter the length of array:- ");
scanf("%d",&n);
int a[n],i,j;
for(i=0;i<n;i++)
{
printf("\n a[%d]=",i);
scanf("%d",&a[i]);
}
big=a[0];
for(i=1;i<n;i++)
{
if(big<a[i])
{
big=a[i];
}
}
printf("greater no:-%d",big);
return 0;
}
Tx
#include
#include
void main()
{
int l;
float area;
printf("\n\n\t\t length:");
scanf("%d",&l);
area=l*l;
printf("\n\n\t\tarea of square:%.3f",area);
getch();
}
Post a Comment