CENG10003
Mohawk Valley Community College
All 1 results
Sort by
-
Programming Homework 2 PROGRAMMIN CENG10003
- Exam (elaborations) • 6 pages • 2022
-
- $9.49
- + learn more
Mohawk College – Computer Engineering Technology 
CENG 10003 – Programming 
Homework 2 
Q1) : 
#include <stdio.h> 
int main() 
{ 
 int x, y, sum; 
 srand(time(0)); 
 
 x = 1 + rand()%6; 
 y = 1 + rand()%6; 
 sum = x + y; 
 
 if (x+y==7 || x+y==11) 
 { 
 printf("Player winsn"); 
 } 
 else { 
 printf("%dn",sum); 
 printf("Thank you for playingn"); 
 } 
 return 0;
Fear of missing out? Then don’t!
Do you wonder why so many students wear nice clothes, have money to spare and enjoy tons of free time? Well, they sell on Stuvia! Imagine your study notes being downloaded a dozen times for $15 each. Every. Single. Day. Discover all about earning on Stuvia