Friday, July 19, 2024

How to Back-Up Mikrotik RouterOS v6.48.6 Configuration

 1. Login to Mikrotik using Winbox or Web Base.

 2. Once you successfully login, find File > Select Backup.



3. After clicking Download, select where you want to save the backup configuration file. Done  ^_^



Determine expenses in C programming

C Program that will determine the total expense of food (25) and drinks(35) for 5 months. Use define to place the fixed value of 1750 per month and 5 months, including newline. Place the foods[25] and drinks[35] in the enumeration. 


#include <stdio.h>
#define MONTH 1760
#define MONTHS 5
#define BREAK '\n'

int count1, count2, count3, count4;
const char unit[100] = "Expenses";
int main()
{
enum value{foods=25, drinks=35,};

int count1 = MONTH * foods;
printf("FOODS: %d %s",count1,unit);

printf("%c",BREAK);
int count2 = MONTH * drinks;
printf("DRINKS: %d %s",count2,unit);

printf("%c",BREAK);
long int count3 = count1 + count2;
long int count4 = count3 * MONTHS;
printf("Total: %d",count3);


return (0);
}

Creating a program that will convert a month into days, hours, minutes, and seconds in C Programming

Use define to assign a fixed value to a new line. Use enumeration as a base value for the conversion and scanf to input the value.


#include <stdio.h>
#define BREAK '\n'

int day1, day2, day3, day4;
const char unit = 'D';

int main()
{
enum value{days=30, hr=24, min=60, sec=60};

printf("Number of Month/s: "); //input day X 30days
scanf("%d",&day1);

int day = days * day1;
printf("= %d Days",day);

printf("%c",BREAK);
printf("Number of Day/s: "); //input day X 24hours
scanf("%d",&day2);

int hrs = day2 * hr;
printf("= %d Hours",hrs);

printf("%c",BREAK);
printf("Number of Hour/s: "); //input Hour X 60min
scanf("%d",&day3);

int mins = day3 * min;
printf("= %d Minutes",mins);

printf("%c",BREAK);
printf("Number of Minute/s: "); //input Minutes X 60secs
scanf("%d",&day4);

int secs = day4 * sec;
printf("= %d Seconds",secs);


return (0);
}