Wipro
Company
Numerical Ability
Number System
The minimum number of digits required to form every no. which is greater than 900 and less than 900 are:-
a.39
b.72
c.49
d.81
Read Solution (Total 3)
-
- EXAMPLES OF C PROGRAMMING.
I HOPE THESE PROGRAMS HELP YOU
Write a program to print a string in C language
#include
#include
main()
{
clrscr();
printf("nKodeGod.com");
getch();
}
Write a program to accept values of two numbers and print their addition
#include
#include
main()
{
int a,b,c;
clrscr();
printf("Enter number 1: ");
scanf("%d",&a);
printf("Enter number 2: ");
scanf("%d",&b);
c=a+b;
printf("Addition is : %d",c);
getch();
}
Write a program to accept values of two numbers and print their subtraction
#include
#include
main()
{
int a,b,c;
clrscr();
printf("Enter number 1: ");
scanf("%d",&a);
printf("Enter number 2: ");
scanf("%d",&b);
c=a-b;
printf("Subtraction : %d",c);
getch();
}
Write a program to accept values of two numbers and print their multiplication in C language
#include
#include
main()
{
int a,b,c;
clrscr();
printf("Enter number 1: ");
scanf("%d",&a);
printf("Enter number 2: ");
scanf("%d",&b);
c=a*b;
printf("Multiplication: %d",c);
getch();
}
Write a program to accept values of two numbers and print their division in C language
#include
#include
main()
{
float a,b,c;
clrscr();
printf("Enter number 1: ");
scanf("%f",&a);
printf("Enter number 2: ");
scanf("%f",&b);
c=a/b;
printf("Division is : %f",c);
getch();
}
Write a program to print area of a circle. A(circle)= 3.142 * R * R in C language
#include
#include
main()
{
float AREA,R;
clrscr();
printf("Enter Radius: ");
scanf("%f",&R);
AREA=3.14*R*R;
printf("Area of the given is : %6.2f",AREA);
getch();
}
Write a program to print area of a triangle A(Triangle)= 0.5 * B * H in C language
#include
#include
main()
{
float AREA,B,H;
clrscr();
printf("Enter Base & Height: ");
scanf("%f%f",&B,&H);
AREA=0.5*B*H;
printf("Area of the given is : %6.2f",AREA);
getch();
}
Write a program to print simple interest SI = (PNR)/100 in C language
#include
#include
main()
{
float SI,P,N,R;
clrscr();
printf("Enter Radius: ");
scanf("%f%f%f",&P,&N,&R);
SI=(P*N*R)/100;
printf("Area of the given is : %6.2f",SI);
getch();
}
Write a program to accept a number from user and print it’s square & cube in C language
#include
#include
main()
{
int n,Square,Cube;
clrscr();
printf("Enter Number: ");
scanf("%d",&n);
Square=n*n;
Cube=n*n*n;
printf("nSquare: %dnCube: %d",Square,Cube);
getch();
}
Write a program to accept two values a & b and interchange their values in C language
#include
#include
main()
{
int a,b,temp;
clrscr();
printf("Enter Numbers: ");
scanf("%d%d",&a,&b);
printf("nBefore Swapping..na=%d,b=%d",a,b);
temp=a;
a=b;
b=temp;
printf("nAfter Swapping..na=%d,b=%d",a,b);
getch();
}
Write a program to accept roll no and marks of 3 subjects of a student, Calculate total of 3 subjects
and average in C language
#include
#include
main()
{
int roll_no,m1,m2,m3,total;
float average;
clrscr();
printf("Enter roll number : ");
scanf("%d",&roll_no);
printf("Enter marks 1 : ");
scanf("%d",&m1);
printf("Enter marks 2 : ");
scanf("%d",&m2);
printf("Enter marks 3 : ");
scanf("%d",&m3);
total=m1+m2+m3;
average=total/3.0;
printf("nStudent Roll Number : %d",roll_no);
printf("nMarks 1 : %d",m1);
printf("nMarks 2 : %d",m2);
printf("nMarks 3 : %d",m3);
printf("nTotal : %d ",total);
printf("nAverage : %f ",average);
getch();
}
Print following outputs: http:\www.kodegod.comnew in C language
#include
#include
main()
{
clrscr();
printf("http:\\www.kodegod.com\learn-programming");
getch();
}
Print the following output in C Language
#include
#include
main()
{
clrscr();
printf("n");
printf(" /\ n");
printf(" //\\ n");
printf(" ///\\\ n");
printf("////\\\\ n");
printf(" ||| n");
printf(" ||| n");
getch();
}
Write a program to accept two number and print largest among them in C language
#include
#include
main()
{
int a,b;
clrscr();
printf("Enter numbers : ");
scanf("%d%d",&a,&b);
if(a>b)
printf("Largest value is….%d",a);
else
printf("Largest value is….%d",b);
getch();
}
Write a program to accept a number and print if the number is Positive/Negative in C language
#include
#include
main()
{
int n;
clrscr();
printf("Enter number..");
scanf("%d",&n);
if(n>0)
printf("Given number is positive");
else if(n10, 10)
printf("Number is greater than 10");
else if(nb)
printf("a is greater than b");
else if(b>a)
printf("b is greater tha b");
else
printf("a and b are equal");
getc - 9 years agoHelpfull: Yes(11) No(3)
- The is wrong:
correct question is : The minimum number of digits required to form every number which is greater than 900 and less than 9,000 is:
Solution :
We have to find the minimum number of numbers required to form every number from 900 to 9,000.
Unit place of a number from 900 to 9,000 can be formed using 0 to 9 digits. i.e., 10 digits.
10's place of a number from 900 to 9,000 can be formed using 0 to 9 digits. i.e., 10 digits.
100's place of a number from 900 to 9,000 can be formed using 0 to 9 digits. i.e., 10 digits.
1000's place of a number from 900 to 9,000 can be formed using 1 to 9 digits. i.e., 9 digits.
Therefore, total number of numbers required is 10 + 10 + 10 + 9 = 39. - 9 years agoHelpfull: Yes(8) No(0)
- it might be from 900 to 9000.if that so then the answer is 39
units place possible numbers from 900 to 9000 is 0 to 9 that is 10 numbers
10 s place possible numbers from 900 to 9000 is 0 to 9 that is 10 numbers
100 s place possible numbers from 900 to 9000 is 0 to 9 that is 10 numbers
10000 s place possible numbers from 900 to 9000 is 0 to 9 that is 9 numbers except 0
so finally the answer is 10+10+10+9=39 - 9 years agoHelpfull: Yes(7) No(1)
Wipro Other Question