0 like 0 dislike

Please write a program, including function(s), that receives one input number, then shows the squared value of the input.

Input 1

10

Output 1

10
100

Input 2

12

Output 2

12
144

[Exercise] Coding (C) - asked in Chapter 3: Branching, Looping and Functions by (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 71 views

16 Answers

0 like 0 dislike
Hidden content!
#include *** * ** *
#include ***** * **

int ** * ***
void * * number);

int main(int argc, char *argv[])
{
* * **
* *** * ** ** a;
* * ***** = ***** * *
* ** * ****
** * ** * ** ***

***** * * * * 0;
}

void * **** ** * number){
* * *** * * * ** **** ** * ** **** * * * ** **
***** * * *** * ** * *** * * * *
}

int ***
** * ***** ** ***** * x;
* *** ****** *** ** *** * * ** * * * *
** ****** * * * * x; **** ****** * * * *
}
100/100 answered by (271 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include * ** * * *
#include ** * ** *** * * *

int ** ***
void * * ***** number);

int main(int argc, char *argv[])
{
* ** ** ****
*** ***** * a;
* ** ** = ***** *
* **** ***** **
** ** * ****
** ****** ** ** ******
* * ******** ** *** *** **
** * ** * ** * * 0;
}

void ** number){
** ** ***** * * ** ** * * * * * * * * * * ***
* ** * *** * ** *** *** * ** **
}

int *** **** *
** * * * ** ***** x;
* * ** *** * ** ** **** ***** *** &x);
* *** * ** ** ** * ** * * x; **** ** * **
}
100/100 answered by (268 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include *** ***
#include *** *** ** ****

int * *
void * *** * number);

int main(int argc, char *argv[])
{
** *** **
* * *** * a, b;
* * ******** = ** *
** ***
* ** * *** * *****
** * ******* * ** ** ** *
** * * * 0;
}

void ** * * * number){
* ** ** * ** *** ******* **** *** * ****** * * * * number);
* * * *** * * * * ** * * *** *
}

int * *
** * *** * ** *** * x;
* ** ** * * **** **** * ** ***** * *** * * ***
* ** ** ** *** * *** x; ** ** ** ** ** *
}
100/100 answered by (283 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include ******* ** **
* ** *** * * *

int * *****
void *** ** * number);

int main(int argc, char *argv[])
{
* ** *
* ** ** ***** a, b;
** * * = *
* ******
** ** * *** **** ** ** *

** **** *
* * * * * * 0;
}

void ** ** ** number){
*** * * * * **** ** * * ** ** ** ** * number);
** *** *** ** * * * * *** *** * *** *
}

int * *** ***
** * ** * * ** * * * x;
**** *** **** * * ** * ** * **** * *** ** *
* * * ** * *** ***** * x; * ** **
}
100/100 answered by (220 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include ** * ** *** *
#include ******** ** * * * **

int readNumber();
void ** ** ** number);

int main(int argc, char *argv[])
{
**** * * * *
** ***** **** * a;
* *
**** ***
** * *** *** ** * * * ** *** = ****
** ** ** ** *
*** * * *****
* * **** * ** *****
 
* * ** *
**** * *
* * * ***** *
* * * * *** * * ** * ** **
*** * * 0;
}

void * * * number){
** * ****** **** ** * * * * * ** * * ** ***** **** *****
*** * *** ** * ** ***
}

int ** * *
* * * * ** * * * ** x;
** * ** * * * * *** * ** * * &x);
** * * * *** *** *** * ** x; * **** **** **** *
}
100/100 answered by (153 points)
edited by
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
\n is not necessary :)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
** ** * ***** * ***
* *****

/* run this * * using the *** pauser or add your own getch, * * * * * ** or input loop */
int ** ***
void ** ** * ***

int * argc, char ** ** * {
******* ** ** * ** a;
* ** * ** ** = * ** ****
**** *** *

** *** * ** * ** **

** ** * * * * * * 0;
}
void * * * **
**** ** ** * **** ** *** * * *** *** ****
* *** * * **** * * ** ** *
}

int * * ****
* * * **** * ** x;
******* * * **** *** ** ** ** * **** * **
*** ** * * ** * ** ** * x; * * * ***** **
}
100/100 answered by (252 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:162.158.79.197
©2016-2019

Related questions

0 like 0 dislike
22 answers
[Exercise] Coding (C) - asked Dec 30, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 84 views
0 like 0 dislike
18 answers
[Exercise] Fill in the blank - asked Dec 23, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 44 views
8,384 questions
65,919 answers
40,347 comments
1,516 users