```
#!/usr/local/bin/python3
import sys
def print_factorial( user_val ):
if( user_val < 1 ):
return( 1 )
else:
return( print_factorial( user_val - 1 ) * user_val )
if( __name__ == "__main__" ):
if( len( sys.argv ) == 2 ):
print( print_factorial( int ( sys.argv[ 1 ] ) ) )
else:
sys.stderr.write( "usage: %s <integer>\n" % sys.argv[ 0 ] )
exit( 0 )
```
Answer:
The program to this question can be given as follows:
Program:
public class data //defining class data
{
//main method
public static void main (String [] as) //declaring main method
{
int userNum = 4; //declare variable userNum and assign value
for (userNum = 1; userNum <= 4; userNum++) //loop for print values
{
System.out.println(userNum); //print values in new lines.
}
}
}
Output:
1
2
3
4
Explanation:
In the above java program code firstly a class "data" is defined, inside this class the main method is defined in which an integer variable userNum is defined that holds a value that is "4".
- In this method, a for loop is declare that uses variable userNum which starts from 1 and ends with a given value that is equal to 4.
- Inside a for loop, the print function is used that print userNum variable each values in the newline.
Answer:
hope you like it
Explanation:
Writing an outline can take place at any time during the writing process. Although it is most commonly used before beginning to write or doing research, this process can also take place during or after writing your paper to make sure your points are organized and make sense.
An outline is a first step for writing: a general, unfinished plan that you will use as a guideline in writing, not a finished product ready to publish. You should use it when you prepare to write a rough draft, before you started writing.