Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Quiz03 Solve:
- /* By the Name of Allah
- Student ID: 211-15-4031
- Name: Md. Shamsuzzaman
- Solve For Quiz3-Ques01*/
- #include <stdio.h>
- int main()
- {
- double n1, n2, n3;
- printf("Enter three different numbers: ");
- scanf("%lf %lf %lf", &n1, &n2, &n3);
- if (n1 >= n2 && n1 >= n3)
- printf("%.2f is the largest number.", n1);
- if (n2 >= n1 && n2 >= n3)
- printf("%.2f is the largest number.", n2);
- if (n3 >= n1 && n3 >= n2)
- printf("%.2f is the largest number.", n3);
- return 0;
- }
- =========================
- /* By the Name of Allah
- Student ID: 211-15-4031
- Name: Md. Shamsuzzaman
- Solve For Quiz3-Ques02*/
- #include <stdio.h>
- int main()
- {
- int i,evenx4031;
- printf("Inter a Number to find total Even & list \n");
- scanf("%d", &evenx4031);
- printf("Total Even= %d\n",evenx4031/2);
- printf("Even numbers between 1 to %d (inclusive):\n",evenx4031);
- for (i = 1; i <= evenx4031; i++)
- {
- if (i % 2 == 0)
- {
- printf("%d ", i);
- }
- }
- return 0;
- }
- ===============================
- /* By the Name of Allah
- Student ID: 211-15-4031
- Name: Md. Shamsuzzaman
- Solve For Quiz3-Ques03*/
- #include <stdio.h>
- int main()
- {
- char name[100];
- printf("What's Your Name?:\n ");
- gets(name);
- printf("Your Name: %s\n", name);
- return 0;
- }
- ----------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement