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

Excellent piece of code :) Thanks a lot

ReplyDeleteThanks for solving many problem related to any programming problem issue....

ReplyDelete#include

ReplyDeleteint main(){

int a,b,c,big;

printf("\nEnter 3 numbers:");

scanf("%d %d %d",&a,&b,&c);

big=(a>b?(a>c?a:b):(b>c?b:c));

printf("\nThe biggest number is:%d",big);

return 0;

}

wanaa any help regarding C..jst mail me at

gotopunit@gmail.com

Your solution is wrong the correct expression of line no. 6 will be :

Deletebig = (a>b)?(a>c?a:c):(b>c?b:c);

any idea how to do this:

ReplyDeleteWrite a program that requests 5 numbers from the user then finds the minimum number among all the number.

Sample Input:

Enter a number 1: 3

Enter a number 2: 0

Enter a number 3: -4

Enter a number 4: 9

Enter a number 5: 0

Sample Output:

Numbers you had input are: 3 0 -4 9 0

Minimum number is: -4

#include

ReplyDelete#include

#define size 5

void main()

{

int no[size],min=0,max=0,i;

clrscr();

for(i=0;ino[i])

{

min=no[i];

}

if(max<no[i])

{

max=no[i];

}

}

printf("\n Minimum No is : - %d",min);

printf("\n Maximum No is : - %d",max);

getch();

}

Note : you can find minimum and maximum number from any number of input number.

void main()

ReplyDelete{

int no[5],i,min,max;

clrscr();

for(i=0;i<5;i++)

{

printf("\n Enter %d No : - ",i+1);

scanf("%d",&no[i]);

}

min=max=no[i];

for(i=0;i<5;i++)

{

if(min>no[i])

min=no[i];

if(max<no[i])

max=no[i]

}

printf("\n Minimum No is : - %d",min);

printf("\n Maximum No is : - %d",max);

getch();

}

#include

ReplyDelete#include

int main()

{

int a,b,c;

printf("Enter value of a,b,c\n");

scanf("%d%d%d",&a,&b,&c);

if(a>b)

{

if(a>c)

printf("Largest no is\t%d",a);

else

printf("Largest no is\t%d",c);

}

else

{

if(b>c)

printf("Largest no is\t%d",b);

else

printf("Largest no is\t%d",c);

}

getch();

}

This code is wrong Try new code .

Delete#include

Delete#include

#define size 5

void main()

{

int no[size],min=0,max=0,i;

clrscr();

for(i=0;ino[i])

{

min=no[i];

}

if(max<no[i])

{

max=no[i];

}

}

printf("\n Minimum No is : - %d",min);

printf("\n Maximum No is : - %d",max);

getch();

}

I wanna Calculate Biggest number among 5 integers plz help me

ReplyDeletepls explain me the 6th line of the above prog...

ReplyDelete6th line: a>b&&a>c?a:b>c?b:c

ReplyDeleteIt is equivalent to:

if(a > b && a>c)

return a

else if (b>c)

return b

else

return c

nice explanation

ReplyDeletethanks for the help and explanation

ReplyDeletePlease show me a program which Takes 10 integers as input and prints the largest one.

ReplyDeleteWrite a c program that allows the user to input an integer value n, followed by n floating point numbers and display the sum of these n values as well as the largest and smallest among the values.

ReplyDeletethen how to find the smallest

ReplyDeletebiggest of 3 nos program is correct.. got correct output ........ but we enter 8-3-9 getting "3 is a largest no" (or) if we enter this no 6-5-9 also getting "5 is largest no" ......... how is possible pls give a solution for me

ReplyDelete...............by raghu