1 like 0 dislike
9.2k views

Please take a look at the uncompleted program in the bottom and fill in the gaps to complete the program in order to display the following output:
Remember: Direct output or cheated output is always forbidden. TA always see your code after the OnlineJudge.

-12.123
-12.123456789
 -12.123456789
-12.123457
-12.12346
-12



Source Code:

#include <stdio.h>
int main()
{
    double x = -12.123456789;
    printf("______________\n", x);
    printf("______________\n", x);
    printf("______________\n", x);
    printf("______________\n", x);
    printf("______________\n", x);
    printf("______________", x);
    return 0;
}

 

[Exercise] Coding (C) - asked in Chapter 3: Formatted Input/Output by (12.1k points)
ID: 26464 - Available when: Unlimited - Due to: Unlimited

edited by | 9.2k views

75 Answers

0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
** * * * * * *** * x = -12.123456789;
*** * **** ** * ** * * * * * ** ** x);
* ** * * ****** **** ** ** * ** * * x);
* * * ** * * * * * * *** %.9f\n", x);
* * * * **** * *** *** ***** ** x);
***** * *** ** ** * ****** **** * ***** x);
* ***** * * * * * * * * x);
** * ** *** ** ** * *** **** 0;
}
answered by (-168 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
* ** ** * * * x = -12.123456789;
** * ** * * * ****** * ** ** ** *** * ** * * x);
*** *** * **** ******** * *** * ***** ** x);
* ****** *** ** * * *** %.9f\n", x);
* ** ******* ** * * * ** *** *** * x);
***** *** **** ** * * * *** ** *** ** * x);
*** *** * ***** **** * ***** * **** * * x);
* ** * * * * * *** ** * 0;
}
answered by (-323 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
* ** *** *** ** *** *** x = -12.123456789;
** * * * * * * * * * * * ** * * ** *** ** * x);
* * ** ** ***** * * * * * * ******** ** x);
***** * * * * * ** ** ****** **** %.9f\n", x);
**** * * *** * * *** * ** *** * ** * * x);
* ** *** * *** * * * * *** * * * ** x);
* * * * * * ***** * * ** * ** *** **** x);
******** ** *** ******* 0;
}
answered by (-254 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
** ** ** * * * *** *** ** x = -12.123456789;
* **** * ** ** *** * * * ** ** * ** * x);
* * **** ****** ** *** * ** **** *** x);
* **** *** * * * * **** **** * * * ** ** * * * x);
* ** * *** * * * ** * *** * * * * * x);
* * * * * * ** * * **** * ******* ** x);
** ** ** * * * ****** * *** ** * * ** x);
**** * * *** *** * * * * 0;
}
answered by (-168 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
#include <stdio.h>
 int main()
 {
*** * ** * * * * **** ****** * * *** x = -12.123456789;
**** ** * *** * ***** ** *** * * * * ** x);
* ** * * * **** * *** * * * * **** *** x);
** * *** ** * * * ** * * * %.9f\n", x);
* * **** ** *** ** ** **** * ** * ** ** *** x);
** *** **** * * * ** * * * ** * * ** x);
* * *** ** * * ** ****** ** *** * *** * * x);
* **** * * ** * ** * **** ** * **** 0; }
answered by (-204 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
 int main()
 {
** **** * ****** * ** ** * ** x = -12.123456789;
** * ***** ** * ***** * ** *** * **** x);
* ** * * ***** * ***** ******* **** * *** *** **** x);
* ** **** * ** * * *** * * * * * * * * * *** ** x);
** *** * **** * * * * ** **** * *** *** x);
*** * *** ** * ** * * * * *** * * *** * ** * **** x);
* ** * * * * * ** * * * * ** *** * x);
*** * * * * * ******* **** **** * 0; }
answered by (-204 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
#include * * * * *
int main(void)
{
** * * ** * ****** x = -12.123456789;

* * **** * * * * **** *** * * * *** * x);
* * ****** * ** ***** ** * * *** ** ** *** x);
*** * **** * * *** * ** * * ** * ** ** x);
* * ** *** ** * **** ** * ** * * ***** * x);

* * * * * * **** ** * * * * * ** x);


**** ** * ******* * * * * * * *** x);



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

/*-12.123
** ** *
** * * * *****
-12.123457
-12.12346
-12*/
answered by (-249 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include *** **** *

int main (void)
{

** *** * * ** *** x = -12.123456789;
* * * **** * ** ***** * *** ** * x);
******* * ** * ** * * * **** * ** x);
*** * ** ** * * * ** * * * **** %.9f\n", x);
** ** *** * * **** *** ******* * ****** * x);
* * *** ** * * * *********** * ** x);
* * * ***** ***** ** * * * * ** * ** x);

* * * *** * * * * * * 0;
}
answered by (-107 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
* * ***** * ** *** ** ** * * x = -12.123456789;
** * * * ** ** * ** ** * ** ** * **** x);
* * ** * ** * * * ** ** ** ** *** * * x);
** **** ** * * ** **** *** ** ** *** ** x);
* ** ** * * * * * *** * ** ***** * *** x);
* * * * * * ** **** ****** **** * *** * x);
* **** *** ***** * * ** **** ***** * *** x);
* ** * ** * * ** ** * 0;
}
answered by (-281 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
** * * ** *
int main()
{
* **** * x=-12.123456789;
**** * * ******* ** ** ***** *
** * *** * * * * ** * *
** * *** * ** %.9f\n",x);
* * * * * *** * * * **
* **** * ** * *** *** *
******** *** ** * ** * * * * *
  return 0;
}
answered by (-255 points)
0 0
Case 0: Correct output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.131.108
©2016-2025

Related questions

3 like 0 dislike
87 answers
[Exercise] Coding (C) - asked Oct 12, 2017 in Chapter 3: Formatted Input/Output by thopd (12.1k points)
ID: 26463 - Available when: Unlimited - Due to: Unlimited
| 10.4k views
1 like 0 dislike
0 answers
[Resource] asked Oct 14, 2017 in Chapter 3: Formatted Input/Output by thopd (12.1k points)
ID: 26948 - Available when: Unlimited - Due to: Unlimited
| 14 views
12,783 questions
183,442 answers
172,219 comments
4,824 users