Advertisement
7_2009-2012 Miscellaneous #221681

Command Button ForeColor...Revisited...

This is Ulli's project posted back on 9/19 with the exception of an addition I made to it., you can now also change the forecolor of command buttons that have multiple line captions.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Upload
/*
*	Basic calculator with switch-case
*	Mustafa Kaan KAMIS 
*	http://www.k2an.com
*/
#include <stdio.h>
int main(void)
{
   char kaankamis; // operators (+,-,*,/)
	 int sayi1,sayi2,toplam; // number1, operator, number2
	 printf("Enter Numbers and Operator : \n");
	 printf("Example : 2 * 4 \n");
	 scanf("%d %c %d",&sayi1,&kaankamis,&sayi2);
   switch (kaankamis)
   {
    case '+':
     toplam = sayi1 + sayi2;
     break;
    case '-':
     toplam = sayi1 - sayi2;
     break;
	  case '*':
     toplam = sayi1 * sayi2;
     break;
	  case '/':
     toplam = sayi1 / sayi2;
     break;
    default:
     printf("Wrong operator please use following operators +,-,*,/ \n");
		 break;
   }
		printf("Result of %d %c %d is : %d\n",sayi1,kaankamis,sayi2,toplam);
return(0);
}
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine