Report a paste

Please put a quick comment for the admin.

If it looks like spam, the admin will mark it as spam so that the spam filter picks it up in the future.

If the paste contains something private or offensive, it'll probably just be deleted.

askisi1

* Omada Ergasias:
                 Dimitris Pericleous       A'Etos,AM: 7399
                 Kotsonis Giorgos          A'Etos,AM: 7397
                 Imerominia Sigrafis:      18/4/2017
                 Leitourgia Programmatos:  Programma pou diavazei akeraious kai kanei elegxous 
*/

#include<stdio.h>
#include<stdlib.h>

int main()
{
	int sum1,sum2,sum3=0;
	int num1,num2,num3;
	int num4,num5,num6;
	
	printf("give a number1:");
	scanf("%d",&num1);
	/*elegxei an o arithmos ine ektos ton orion 0-10
	ke diavazei ksana mexri o xristis na dosei
	arithmo mesa sta sosta oria */
	while(num1<0||num1>10)
	{
	printf("give a number1 from 0 to 10:");
	scanf("%d",&num1);
	}	
	
	printf("give a number2:");
	scanf("%d",&num2);
	while(num2<0||num2>10)
	{
	printf("give a number2 from 0 to 10:");
	scanf("%d",&num2);
	}	
	
	printf("give a number3:");
	 scanf("%d",&num3);
	
	while(num3<0||num3>10)
	{
	printf("give a number3 from 0 to 10:");
	scanf("%d",&num3);
	}	
	
	//ta athrismata ton zevgarion
	sum1=num1+num2;
	sum2=num1+num3;
	sum3=num2+num3;
	//elegxi an to athrisma ton proton dio arithmon isute me to trito arithmo
	if(sum1==num3)
	{
		printf("numbers are :%d %d %d ,from sum1(num1+num2)",num1,num2,num3);
	}
	//elegxi an to athrisma tou protou kai tritu arithmu isute me ton deftero
	else if(sum2==num2)
	{
		printf("\nnumbers are :%d %d %d , from sum2(num1+num3)",num1,num2,num3);
	}
	//elegxi an to athrisma tu defterou kai tritu arithmou isute me ton proto arithmo
	else if(sum3==num1)
	{
		printf("\nnumbers are :%d %d %d ,from sum3(num2+num3)",num1,num2,num3);
	}
	//an den isxyei tipota apo ta pio pano
	else 
		printf("nothing equal ");
	
	printf("\n");
	//DEFTERO KOMMATI TIS ASKISIS	
	
	//diavazi tous neous treis akereous arithmous
	printf("Give numbers for num4:");
	 scanf("%d",&num4);
	printf("Give numbers for num5:");
	 scanf("%d",&num5);
	printf("Give numbers for num6:");
	 scanf("%d",&num6);
	 
	 
	/*elegxi an o arithmos ine pollaplasios tu 6 ke diaforos apo to 20*/
	
	if(num4 % 6 ==0)
	  printf("\nnumber is module 6 is 0(pollaplasio tou6)\n");
	else if(num4!=20)
	  printf("\nnumber4 is:=%d",num4); 
	  
	printf("\n");

	if(num5 % 6 ==0)
	  printf("\nnumber is module 6 is 0(pollaplasio tou6)\n");
	else if(num5!=20)
	  printf("\nnumber5 is:=%d",num5);
	   
	printf("\n");

	if(num6 % 6 ==0)
	  printf("\nnumber is module 6 is 0(pollaplasio tou6)");
	else if(num6!=20)
	  printf("\nnumber6 is:=%d",num6);
	
	
	system("pause");
	return 0;	
}