Question about Microsoft Computers & Internet

1 Answer

Writing the program in c language for finding the factorial of500

The out put should be totally in integers with out and exponential value

Posted by on

Ad

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Vice President:

    An expert whose answer got voted for 100 times.

    Sniper:

    An expert who has posted more than 50 answers, of which 90% or more were rated as helpful.

  • Expert
  • 81 Answers

If it's an int type it's already integer without exponential for examle:
void main()
{
int num=5;
num/=2;
clrscr();
printf("%d",num);
}
so the out put is 2 and no 2.5 or:

for(int i=0; i<num; i++)

so 'i' is the integer part of num.
Rate me please, thanks.

Posted on Jul 11, 2009

  • Vlad Pankov
    Vlad Pankov Jul 11, 2009

    If you save this number to int type he will return only integers by round it, or try:

    for(int i=0; i
    now 'i' is the integer part.
    Rate me please, thanks.

×

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Write an algorithm that reads two values, determines the largest value and prints the largest value with an identifying message


If they're integer values (assuming they're already in variables named A and B), you could use

int C=A; if (B>A) C=B; printf ("Largest is %i\n", C);

Jun 01, 2014 | Borland Turbo C++ Suite 1.0...

1 Answer

Write a program that accept a number and output its equivalent in word


Use the value that will be printed by the keyboar.
After you enter the value.
You have to cast the type you have used as integer or float into string or character type.
So here the type casting of the datatype will be used.

Oct 10, 2011 | Borland Turbo C++ 4.5 Full Version for PC

4 Answers

What is computer programing?


> what is computer pro gaming?
> what is computer programming?

The latter is the writing of instructions that a computer can follow, to solve a problem,
e.g.,
set the variable 'X' to the value '3';
set the variable 'Y' to the value '7';
calculate the value of X divided by Y, and store into 'Z';
display the value of 'Z', to 7 decimal-places;
stop running this program.

Jun 15, 2011 | Computers & Internet

1 Answer

Is it possible to to convert charrcter datatype into integer datatype


If you want to get the ASCII value of a character, or just convert it into an int (say for writing to an OutputStream), you need to cast from a char to an int.

What's casting? Casting is when we explicitly convert from one primitve data type, or a class, to another. Here's a brief example.
public class char_to_int { public static void main(String args[]) { char myChar = 'a'; int i = (int) myChar; // cast from a char to an int System.out.println ("ASCII value - " + i); } }

In this example, we have a character ('a'), and we cast it to an integer. Printing this integer out will give us the ASCII value of 'a'.

Nov 04, 2010 | Answer Racing Ion Motorcycle Jersey 2010

1 Answer

What are the heirarchy of operation?


Hi,

The following information on "Hierarchy of Operations" was taken from Pages 45-46 of the "Microsoft QuickBasic 4.0: Basic Language Reference" manual for Versions 4.00 and 4.00b. This information also applies to the following products:

  1. Microsoft GW-Basic Versions 3.20, 3.22, and 3.23
  2. QuickBasic Versions 1.00, 1.01, 1.02, 2.00, 2.01, 3.00, 4.00, 4.00b, and 4.50
  3. Microsoft Basic Compiler Versions 5.35, 5.36, 6.00, and 6.00b
  4. Microsoft Basic PDS Version 7.00.
MORE INFORMATION The Basic operators have an order of precedence, that is, when several operation... loadTOCNode(1, 'moreinformation'); The Basic operators have an order of precedence, that is, when several operations take place within the same program statement (without being grouped by parentheses), some operations are executed before others. Operations are executed in the following order:

  1. Arithmetic operations

    1. Exponential (^)
    2. Negation (-)
    3. Multiplication and division (*, /)
    4. Integer division (\)
    5. Modula arithmetic (MOD)
    6. Addition and subtraction (+, -)
  2. Relational operations (=, >, <, <>, <=, >=)
  3. Logical operations

    1. NOT
    2. AND
    3. OR
    4. XOR
    5. EQV
    6. IMP
An exception to the order of operations listed above occurs when an expression has adjacent exponentiation and negation operators. In this case, the negation is done first. For example, the following statement prints the value .0625 (equivalent to 4^-2), not -16 (equivalent to -(4^2)): PRINT 4 ^ -2 If operators on the same precedence level appear in the same expression, they are computed from left to right.

For more information on the "Hierarchy of Operations," consult the Basic language reference manual for your version of Basic. Please post your feedback and Vote if the problem resolved as per your satisfaction.

Jul 13, 2010 | Microsoft Windows XP Professional

1 Answer

Code for method parseInt() in java


parseInt(java.lang.String, int)

This code takes two arguments, a string constructor from the Java language and an integer. Its purpose is to parse (meaning de-construct or disassemble into component parts) one data type into another.

Here is an example of a Java program to specify and print out the dimensions of a rectangle, taken from the page http://www.roseindia.net/java/beginners/entervaluesfromkeyboard.shtml:

class Rectangle{
int length, breadth;
void show(int x, int y){
length = x;
breadth = y;
}
int calculate(){
return(length * breadth);
}
}
public class EnterValuesFromKeyboard{
public static void main(String[] args) {
Rectangle rectangle = new Rectangle();
int a = Integer.parseInt(args[0]);
int b = Integer.parseInt(args[1]);
rectangle.show(a, b);
System.out.println(" you have entered these values : " + a + " and " + b);
int area = rectangle.calculate();
System.out.println(" area of a rectange is : " + area);
}
}

Apr 09, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

Insertion sort


<!--StartFragment-->
Function InsertionSort(ByVal TempArray As Variant) As Variant
' Written By Louis Sutherland
' 1/25/99
' will be the sorted arrary when finishe
' d
Dim SortedList As Variant
Dim x, y As Integer
Dim NumSorted As Integer
'This Set up SortedList as an Array
SortedList = TempArray
'This zeroizes the new array


For x = 1 To UBound(SortedList)
SortedList(x) = 0
Next x
'sets the Total num counted to 1
NumSorted = 1
' Processes first element
SortedList(1) = TempArray(1)


For x = 2 To 5000
' insertion loop


For y = NumSorted To 1 Step -1
' if current value is <= then insert in
' next place


If TempArray(x) >= SortedList(y) Then
SortedList(y + 1) = TempArray(x)
'This Breaks the loop
y = 1
Exit For
Else


If y = 1 Then
SortedList(y + 1) = SortedList(y)
SortedList(y) = TempArray(x)
Exit For
Else
' save the value to the next spot
SortedList(y + 1) = SortedList(y)
End If
End If
Next y
'advance total num sorted
NumSorted = NumSorted + 1
Next x
InsertionSort = SortedList
End Function




Mar 17, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

Please Solve this C++ Program


Write a program to prompt the user to input several lines of input. A line of inputs is terminated by '*'. For each readline of input the program should output:(use pointer notation for the array) . The total # of words . The lenght of the longest word in the line At the end the program should output: . The total number of words read in all lines of input . The lenght of the longest word read in all lines of input

Jan 19, 2009 | Computers & Internet

1 Answer

Factorial


1.In mathematics, the factorial of a non negitive integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example,
c018852104089c3b86ad5bba9e9223f9.png and4870ed458b29bbc1925d3466e81e4b0d.png2. Algorithm to find factorial of 6
1. Start
2. Take two variables i and j.
3. Take a constent VALUE=6.
4. Put i=1,j=1.
5. If i is less than VALUE goto 6 else goto 7
6. j=j*i and goto step 5
7. Print j value.
8. Stop.
/* Program to find factorial of 6 */

#include <stdio.h>

#define VALUE 6
int i,j;

void main()

{

j=1;

for (i=1; i<=VALUE; i++)

j=j*i;

printf("The factorial of %d is %d\n",VALUE,j);

}

Jan 19, 2009 | Computers & Internet

1 Answer

Pls. help me


Q.2#  Dim n, sum as Double
Dim i as Integer
n=100
sum=0

for i=1 to n
sum=sum+1/n
next i

Q.3#  Dim sum as Double
sum=0
for i=1 to 99
if i%2 <> 0 then sum=sum+i end if
next i

Sep 16, 2008 | Microsoft AccRepair DS2 2004 for Fr...

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

47 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

3015 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18425 Answers

Alun Cox

Level 3 Expert

2678 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...