Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  The program adds 25 and subtracts 10
Language: C/C++
Code:
#include<stdio.h>
#include<conio.h>
int main() {
    int val1, val2;
    printf("Enter a value: ");
    scanf("%d", &val1);
    if (val1 < 24) {
        val2 = val1 + 25;
    }
    else {
         val2 = val1 - 10;
    }
    printf("%.2d becomes %.2d", val1, val2);
getch();
return 0;
}

          
          
Comments: